I'm new to C++. Been learning it through Qt. A lot of videos on youtube for that. Anyway, I wanted to give CodeLite a shot, so I started doing this tutorial. A few lines down the page, it tells me: "Set the wxDataViewCtrl Expand flag and make the proportion 1, so it will consume all the remaining space in the wxFrame". I did this maybe a dozen times. NOTHING. So what do I need to do to make this work like it does in the tutorial? What do I need to do to make the wxDataViewCtrl expand?
Thanks for your help.
Not what I expected
-
- CodeLite Curious
- Posts: 8
- Joined: Thu Feb 01, 2018 11:13 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Not what I expected
You do not have the required permissions to view the files attached to this post.
Linux Mint 18.3
CodeLite 11.0.8
wxCrafter 2.7
CodeLite 11.0.8
wxCrafter 2.7
-
- CodeLite Plugin
- Posts: 819
- Joined: Wed Sep 03, 2008 7:26 pm
- Contact:
Re: Not what I expected
Hi,
The most likely reason is that the containing sizer (or that sizer's containing sizer, or...) itself doesn't have the correct flags/proportion, and so doesn't expand. So the wxDataViewCtrl is expanding as much as possible, but that's not very much. You should be able to check the effective sizes of those sizers by selecting them in wxCrafter.
Failing that, what is the parent of the wxDataViewCtrl? If it's a wxPanel, then check the effective size of that too.
If neither of those suggestions help, you need to provide more information about your heirarchy. At present we can see the wxDataViewCtrl's sizer flags and not much else.
Regards,
David
The most likely reason is that the containing sizer (or that sizer's containing sizer, or...) itself doesn't have the correct flags/proportion, and so doesn't expand. So the wxDataViewCtrl is expanding as much as possible, but that's not very much. You should be able to check the effective sizes of those sizers by selecting them in wxCrafter.
Failing that, what is the parent of the wxDataViewCtrl? If it's a wxPanel, then check the effective size of that too.
If neither of those suggestions help, you need to provide more information about your heirarchy. At present we can see the wxDataViewCtrl's sizer flags and not much else.
Regards,
David
-
- CodeLite Curious
- Posts: 8
- Joined: Thu Feb 01, 2018 11:13 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Not what I expected
Hi David:
My hierarchy is the same as on the tutorial page.
And since I'm following the tutorial step-by-step, I have no idea at all what to do at this point. Kinda frustrating.
Slyde
My hierarchy is the same as on the tutorial page.
And since I'm following the tutorial step-by-step, I have no idea at all what to do at this point. Kinda frustrating.
Slyde
You do not have the required permissions to view the files attached to this post.
Linux Mint 18.3
CodeLite 11.0.8
wxCrafter 2.7
CodeLite 11.0.8
wxCrafter 2.7
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Not what I expected
HI Slyde,
Click on the m_mainPanel and make sure that it too has the expand and proportion flag of 1.
Like David suggested: the wxDVC expands as much as it to fit it parent's size, so you need to make sure that its parent container (m_mainPanel) is expanding as expected to fill the entire frame size
Click on the m_mainPanel and make sure that it too has the expand and proportion flag of 1.
Like David suggested: the wxDVC expands as much as it to fit it parent's size, so you need to make sure that its parent container (m_mainPanel) is expanding as expected to fill the entire frame size
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 8
- Joined: Thu Feb 01, 2018 11:13 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Not what I expected
Hi eranif:
They do. I checked all of that, but I still can't get it to fully expand.
Do you see anything wrong?
Slyde
They do. I checked all of that, but I still can't get it to fully expand.
Do you see anything wrong?
Slyde
You do not have the required permissions to view the files attached to this post.
Linux Mint 18.3
CodeLite 11.0.8
wxCrafter 2.7
CodeLite 11.0.8
wxCrafter 2.7
- eranif
- CodeLite Plugin
- Posts: 6375
- Joined: Wed Feb 06, 2008 9:29 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Not what I expected
Remove the wxALIGN_CENTER from the parent container (m_mainPanel) and it will fix this. I am not sure why it affects its size, but it seems to do the trick here (it's a wxWidgets issue not wxCrafter/CodeLite issue)
Eran
Eran
Make sure you have read the HOW TO POST thread
-
- CodeLite Curious
- Posts: 8
- Joined: Thu Feb 01, 2018 11:13 pm
- Genuine User: Yes
- IDE Question: C++
- Contact:
Re: Not what I expected
Thanks, Eran. I tried to remove that earlier, but, as you can see, it's grayed out. I didn't think to use the alignment icons above the Form. Now if I can get to the point of being able to use this with MariaDB and Sqlite3, you'll have a new customer. Clean interface, btw.
Thanks again for your help.
Slyde
Thanks again for your help.
Slyde
Linux Mint 18.3
CodeLite 11.0.8
wxCrafter 2.7
CodeLite 11.0.8
wxCrafter 2.7