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? [SOLVED -good example] [message #20786 is a reply to message #20782] |
Tue, 07 April 2009 12:10 |
mrjt
Messages: 705 Registered: March 2007 Location: London
|
Contributor |
|
|
kbyte wrote on Tue, 07 April 2009 09:53 | Any simple app example to show the way how we use this new control?
Alex
|
It's very easy:
class CtrlLibTest : public WithCtrlLibTestLayout<TopWindow> {
public:
typedef CtrlLibTest CLASSNAME;
WithTestLayout<ParentCtrl> c1, c2;
ExpressPane pane;
CtrlLibTest::CtrlLibTest()
{
CtrlLayout(*this, "Window title");
Sizeable();
CtrlLayout(c1);
CtrlLayout(c2);
pane.Add("Child 1", c1);
pane.Add("Child 2", c2);
Add(pane.SizePos());
}
};
It's basically a Splitter with a set of buttons at the bottom for different Ctrls that can be dynamically added/removed by the user. A nice concept.
My suggestions for improvement:
-Instead of having the buttons in the Splitter put them in a FrameSplitter. This will make your layout simpler and also give you the option of having the buttons on the left, right or top of the ctrl.
-The buttons would look better if you used a ButtonOption, maybe with a custom Style, and no spacing between them. This would also remove the need for the isInSplitter member.
-Inherit from ParentCtrl, not Ctrl.
-I'm not entirely convinced a Splitter is the best way here, Outlook seems to just swap the controls (only having one visible at a time).
-You may also be interested in this package, which is a different approach to a similar problem.
James
[Updated on: Wed, 08 April 2009 10:47] 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 09:33:01 CEST 2024
Total time taken to generate the page: 0.02500 seconds
|