|
|
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Filling TabCtrl from Layout
Filling TabCtrl from Layout [message #3834] |
Thu, 29 June 2006 15:10 |
brianE
Messages: 13 Registered: June 2006
|
Promising Member |
|
|
Hi Guys,
I have tried reading thread call 'Forlano tabs' but am still not clear on this point; please advise.
I have simple layout: splitter, TabCtrl at top; ArrayCtrl under it.
I have second layout: some buttons.
I have third layout: some edits.
I want to put the buttons layout on tab1 of the TabCtrl and the edits layout on tab2 of the TabCtrl. I know you can do this! But I can't get my head around where things get declared and where to 'Add'. Please point me in right direction.
BrianE
|
|
|
|
|
Re: Filling TabCtrl from Layout [message #3839 is a reply to message #3834] |
Thu, 29 June 2006 18:57 |
brianE
Messages: 13 Registered: June 2006
|
Promising Member |
|
|
Hi, Luigi
The app is great - if somewhat complex for my present needs! However, it has lots of things I can look at later. I managed to extract the essence of what is needed and now my own little app works, so thanks.
I manually typed in all the things I needed to make it work but I'm pretty sure there must be ways to play copy/paste more than just the class declarations; so, as always, more questions:
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(){;}
};
I'm not sure what "CtrlLayout(*this, "");" actually does.
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. [I have found this now!]
How can I get to see files that are not in my project whilst still having my project workable-with? At the moment I have two Upp's working at the same time!
I do read the documentation but at this stage it's hard to know which bits are the most important!
BrianE
[Updated on: Thu, 29 June 2006 20:33] Report message to a moderator
|
|
|
Re: Filling TabCtrl from Layout [message #3841 is a reply to message #3839] |
Thu, 29 June 2006 21:20 |
|
forlano
Messages: 1202 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 Nov 10 20:20:12 CET 2024
Total time taken to generate the page: 0.01246 seconds
|
|
|