Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Filling TabCtrl from Layout
Re: Filling TabCtrl from Layout [message #3841 is a reply to message #3839] |
Thu, 29 June 2006 21:20 |
|
forlano
Messages: 1189 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
I know it is complicated, but you started asking something (TabCtrl) not so immediate
brianE wrote on Thu, 29 June 2006 18:57 |
I don't really understand when to use the word 'Layout' or the use of 'With' as in:
class VegaTabs : public WithVegaTabsLayout<TopWindow> {
public:
typedef VegaTabs CLASSNAME;
VegaTabs();
~VegaTabs(){;}
};
|
"Layout" is just a name! It has no effect except that to remind you that the class come from designer. Sometimes I've not used the word "Layout". See for example the layout "NewTournamet" without 'layout'. You are free to name the layout as you like.
"With" instead is automatically added by Designer to the name of the layout when you generate the code with ALT + C (I hope you remind the tutorial about designer). I've never changed the label "WithLayoutName" and I think it is safe to not change it (maybe others can confirm this guessing). Instead you can write:
class BrianTabs : public WithVegaTabsLayout<TopWindow>
instead of that above.
Quote: |
I'm not sure what "CtrlLayout(*this, "");" actually does.
|
This is something you do not need to know! It is a standard non verbose U++ way to build the class widget. I do not know exactly what is does, but I easily guess it reads the lay file (see it with CTRL+T) corrispondent to its own layout and create really the widgets you have designed (allocated memory, and so on). Try this in some class that open a window to see the effect
CtrlLayout(*this, "My experiment");
(observe the title of the window).
Quote: |
I don't know how to create new cpp files eg your "VegaTab1.cpp" so that I can split up the various classes I will need.
|
Do you remind how to create a lay file? Well, it is the same, just type myfile.cpp and the file will appear in your package.
Quote: | I read the documentation but at this stage it's hard to know which bits are the most important!
|
It is normal. For this reason the forum exists.
Now try to build your own easy class that do some simple thing: For example drop two editint fields, a button and a label. The pressure of the button does the sum of what it is inside the editfields and write it in the label. I started doing these things in order to master the behaviour of the elementary widgets. Try to coordinate the behaviour of these 4 widgets and then come again with the code. Follow even the tutorial about designer.
Then we pass to the TabCtrl that is a bit more complicated. I was not able to manage it without the help of Aris (our forum Administrator) when I began.
Luigi
[Updated on: Thu, 29 June 2006 21:23] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Jun 09 23:49:01 CEST 2024
Total time taken to generate the page: 0.01641 seconds
|