Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » TabDlg Remove 'Close' Button
TabDlg Remove 'Close' Button [message #37668] Thu, 01 November 2012 01:49 Go to next message
nejnadusho is currently offline  nejnadusho
Messages: 60
Registered: October 2012
Member
index.php?t=getfile&id=3906&private=0

Hi,

I created a TabDlg and when I display it there is a 'Close' button in the lower right corner.
I haven't put it there!

How can I remove it?


	TabDlg adminDlg;
		WithAdminLayout<ParentCtrl> tab1;
		WithAdminRegNewUserLayout<ParentCtrl> tab2;		
		adminDlg (tab1, "Tab1")(tab2, "Tab2")
			.Title("Admin's Workspace")
			.Sizeable()
			.Zoomable()
			;
		
		adminDlg.Execute();


Thank you for your help.
nejnio
Re: TabDlg Remove 'Close' Button [message #37672 is a reply to message #37668] Thu, 01 November 2012 07:49 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi nejnio

nejnadusho wrote on Thu, 01 November 2012 01:49

I created a TabDlg and when I display it there is a 'Close' button in the lower right corner.
I haven't put it there!

How can I remove it?


All the Ctrls on TabDlg are fortunately public, so you can do anything with them Smile To remove the default close button, just add following before the Execute() call:
		adminDlg.RemoveChild(&adminDlg.exit);
		adminDlg.tabctrl.SizePos();
The first line removes the button, the second resizes the ctrl holding the tabs, so that entire area is used.

Best regards,
Honza
Re: TabDlg Remove 'Close' Button [message #37682 is a reply to message #37668] Thu, 01 November 2012 21:18 Go to previous messageGo to next message
nejnadusho is currently offline  nejnadusho
Messages: 60
Registered: October 2012
Member
Hi Honza,

No kidding you are already my U++ Guru Smile

Quote:


dolik.rce wrote on Thu, 01 November 2012 02:49
All the Ctrls on TabDlg are fortunately public, so you can do anything with them To remove the default close button, just add following before the Execute() call:
		adminDlg.RemoveChild(&adminDlg.exit);
		adminDlg.tabctrl.SizePos();


The first line removes the button, the second resizes the ctrl holding the tabs, so that entire area is used.






From what I understand the TabCtrl is a subclass in TabDlg.
Is that correct?


Best,
nejnio

[Updated on: Thu, 01 November 2012 21:21]

Report message to a moderator

Re: TabDlg Remove 'Close' Button [message #37685 is a reply to message #37682] Thu, 01 November 2012 23:40 Go to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

nejnadusho wrote on Thu, 01 November 2012 21:18

From what I understand the TabCtrl is a subclass in TabDlg.
Is that correct?

TabDlg contains a member tabctrl of class TabCtrl. See the code, it is actually quite simple and demonstrates quite nicely how easy it is to write GUI in U++: TabCtrl.h. You can also use TabCtrl directly in your own layouts, dialogs, etc.

Honza
Previous Topic: What type are the tabs?
Next Topic: THISBACK(function(parameter)) Error C2102
Goto Forum:
  


Current Time: Fri May 03 08:18:19 CEST 2024

Total time taken to generate the page: 0.02702 seconds