Not what I expected

General questions regarding the usage of CodeLite
Slyde
CodeLite Curious
Posts: 8
Joined: Thu Feb 01, 2018 11:13 pm
Genuine User: Yes
IDE Question: C++
Contact:

Not what I expected

Post by Slyde » Sun Feb 04, 2018 12:52 am

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?
Screenshot from 2018-02-03 14-39-20.png
Thanks for your help.
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

DavidGH
CodeLite Plugin
Posts: 585
Joined: Wed Sep 03, 2008 7:26 pm
Contact:

Re: Not what I expected

Post by DavidGH » Sun Feb 04, 2018 2:55 am

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

Slyde
CodeLite Curious
Posts: 8
Joined: Thu Feb 01, 2018 11:13 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Not what I expected

Post by Slyde » Sun Feb 04, 2018 3:10 am

Hi David:

My hierarchy is the same as on the tutorial page.
Screenshot from 2018-02-03 17-06-02.png
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

User avatar
eranif
CodeLite Plugin
Posts: 5934
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Not what I expected

Post by eranif » Sun Feb 04, 2018 10:54 am

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
Make sure you have read the HOW TO POST thread

Slyde
CodeLite Curious
Posts: 8
Joined: Thu Feb 01, 2018 11:13 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Not what I expected

Post by Slyde » Sun Feb 04, 2018 11:27 am

Hi eranif:

They do. I checked all of that, but I still can't get it to fully expand.
Screenshot from 2018-02-04 01-21-26.png
Screenshot from 2018-02-04 01-21-36.png
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

User avatar
eranif
CodeLite Plugin
Posts: 5934
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Not what I expected

Post by eranif » Sun Feb 04, 2018 12:53 pm

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
Make sure you have read the HOW TO POST thread

Slyde
CodeLite Curious
Posts: 8
Joined: Thu Feb 01, 2018 11:13 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Not what I expected

Post by Slyde » Sun Feb 04, 2018 1:11 pm

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
Linux Mint 18.3
CodeLite 11.0.8
wxCrafter 2.7

Post Reply