Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Howto create control-collection -control? [SOLVED -good example]
Re: Howto create control-collection -control? [message #1666 is a reply to message #1663] |
Sun, 12 March 2006 12:47 |
|
mirek
Messages: 13976 Registered: November 2005
|
Ultimate Member |
|
|
Callback argCB = callback1(this,Toggle, btnIndx++);
usually, we now prefer to place
typedef ExpressPane CLASSNAME;
inside ExpressPane declaration and then
Callback argCB = THISBACK1(Toggle, btnIndx++);
(pays off if you are about to assing more callbacks.
Avoid btnIndex, use "closer.GetCount()".
Also, avoid "new":
Button& button = closer.Add();
means:
void ExpressPane::Add(const char *text, Ctrl& slave){
int btnIndx = closer.GetCount();
Button& button = closer.Add();
button <<= THISBACK1(Toggle, btnIndx);
button.SetLabel(text);
button.HSizePosZ(0, 0).BottomPosZ(BTN_SPACE * (btnIndx-1), BTN_SPACE -2);
splitter.HSizePosZ(0, 0).VSizePosZ(0, BTN_SPACE * btnIndx);
Ctrl::Add(button);
SlaveControl& slvCtrl = slaves.Add();
slvCtrl.isInSplitter = false;
slvCtrl.slave = &slave;
}
Even more optimal would be to place Button inside SlaveControl and manage just a single array...
(I am still missing Rearrange, just toying with the code as it is)
Mirek
[Updated on: Sun, 12 March 2006 12:50] Report message to a moderator
|
|
|
|
|
Howto create control-collection -control? [SOLVED -good example]
By: wilho on Tue, 07 March 2006 22:45
|
|
|
Re: Howto create control-collection -control?
By: mirek on Tue, 07 March 2006 23:32
|
|
|
Re: Howto create control-collection -control?
By: wilho on Sat, 11 March 2006 18:09
|
|
|
Re: Howto create control-collection -control?
By: mirek on Sat, 11 March 2006 18:43
|
|
|
Re: Howto create control-collection -control?
By: wilho on Sat, 11 March 2006 19:33
|
|
|
Re: Howto create control-collection -control?
By: mirek on Sat, 11 March 2006 20:39
|
|
|
Re: Howto create control-collection -control?
By: wilho on Sun, 12 March 2006 11:25
|
|
|
Re: Howto create control-collection -control?
By: mirek on Sun, 12 March 2006 12:47
|
|
|
Re: Howto create control-collection -control?
By: wilho on Mon, 13 March 2006 20:42
|
|
|
Re: Howto create control-collection -control?
By: mirek on Mon, 13 March 2006 22:04
|
|
|
Re: Howto create control-collection -control?
By: fudadmin on Tue, 14 March 2006 18:05
|
|
|
Re: Howto create control-collection -control?
By: wilho on Tue, 14 March 2006 19:23
|
|
|
Re: Howto create control-collection -control? [SOLVED -good example]
By: kbyte on Tue, 07 April 2009 10:53
|
|
|
Re: Howto create control-collection -control? [SOLVED -good example]
By: mrjt on Tue, 07 April 2009 12:10
|
|
|
Re: Howto create control-collection -control? [SOLVED -good example]
By: kbyte on Tue, 07 April 2009 15:29
|
|
|
Re: Howto create control-collection -control? [SOLVED -good example]
By: kbyte on Tue, 07 April 2009 15:36
|
|
|
Re: Howto create control-collection -control? [SOLVED -good example]
By: mrjt on Wed, 08 April 2009 10:52
|
|
|
Re: Howto create control-collection -control? [SOLVED -good example]
By: kbyte on Wed, 08 April 2009 11:46
|
|
|
Re: Howto create control-collection -control? [SOLVED -good example]
By: mrjt on Wed, 08 April 2009 16:05
|
|
|
Re: Howto create control-collection -control? [SOLVED -good example]
By: kbyte on Thu, 09 April 2009 10:26
|
Goto Forum:
Current Time: Fri May 10 00:47:14 CEST 2024
Total time taken to generate the page: 0.01597 seconds
|