Home » U++ Library support » TabCtrl » TabDlg propose
Re: TabDlg propose [message #19678 is a reply to message #19675] |
Sun, 04 January 2009 19:26 |
|
luzr wrote on Sun, 04 January 2009 16:02 | Not sure:
Calling SizePos on tab component is quite easy. OTOH, sometimes you might want the tab not to be resized - and doing this, you are loosing this option.
|
Sorry for stupid question...
How can i do? i tryed, but not work:
TabDlg dlg;
WithOptionsGeneralLayout<ParentCtrl> tab_options_general;
tab_options_general.SizePos();
dlg.Add(tab_options_general, t_("General")).Slave(&tab_options_general);
edit: May be add third parameter, "bool slave = false"?
In TabCtrl.h
class TabDlg : public TopWindow {
...
TabCtrl::Item& Add0(Ctrl& tab, const char *text, bool isslave = false);
...
TabCtrl::Item& Add(T& tab, const char *text, bool isslave = false) { CtrlLayout(tab); return Add0(tab, text, isslave); }
...
TabDlg& operator()(T& tab, const char *text, bool isslave = false) { Add(tab, text, isslave); return *this; }
In TabCtrl.cpp
TabCtrl::Item& TabDlg::Add0(Ctrl& tab, const char *text, bool isslave)
{
Size tsz = max(tab.GetRect().GetSize(), sz);
if(isslave)
tab.SizePos();
TabCtrl::Item& m = tabctrl.Add(tab, text);
if(isslave)
m.Slave(&tab);
if(tsz != sz) {
sz = tsz;
Rearrange();
}
return m;
}
[Updated on: Sun, 04 January 2009 21:50] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon May 13 17:54:00 CEST 2024
Total time taken to generate the page: 0.02359 seconds
|