Hello
I have a wxFlexGridSizer with 3 columns. In the first and third column I put a spacer, in the middle there's a bitmap, a small arrow pointing downwards. Underneath that arrow there is a progress bar. The small arrow should indicate a "reward" as soon as the progress bar has reached a certain value. So I have to put this arrow somewhere along the progress bar to indicate the "reward level". All I could do so far is put it to the left, center or the right. If I try to change from "default position" to another x/y position, nothing will happen.
Maybe there's a better way altogether to do what I want. But I wonder: Can't you specify a position of a bitmap inside a column of a wxFlexGridSizer?
Thanks,
Thomas
Set position of bitmap inside a wxFlexGridSizer
-
- Ultimate wxWidgets Guru
- Posts: 675
- Joined: Tue Jul 26, 2016 2:00 pm
Re: Set position of bitmap inside a wxFlexGridSizer
Not directly.Can't you specify a position of a bitmap inside a column of a wxFlexGridSizer?
As a workaround i would use a horizontal boxsizer containing an additional spacer and the bitmap. The width of that spacer will control the position of the bitmap.
Use the source, Luke!
-
- Ultimate wxWidgets Guru
- Posts: 675
- Joined: Tue Jul 26, 2016 2:00 pm
Re: Set position of bitmap inside a wxFlexGridSizer
Yes, that's what I did first (using a boxsizer with a spacer) which worked well. But I thought maybe a FlexGridSizer would give less nested / complicated code.
If I use a boxsizer I might as well design everything using boxsizers instead of FlexGridSizers. I thought using FlexGridSizers would group the items better as I need them for about 20 students. So each student has an arrow, progress bar with indicated name and value and underneath the possibility to choose from 1 to 3 points for each school day. So I'll have at least 3 rows for each student. But on second thought everything might be easier if I use boxsizers only.
If I use a boxsizer I might as well design everything using boxsizers instead of FlexGridSizers. I thought using FlexGridSizers would group the items better as I need them for about 20 students. So each student has an arrow, progress bar with indicated name and value and underneath the possibility to choose from 1 to 3 points for each school day. So I'll have at least 3 rows for each student. But on second thought everything might be easier if I use boxsizers only.
Re: Set position of bitmap inside a wxFlexGridSizer
A wxFlexGridSizer is probably still needed. With individual boxsizers only it will be hard to align the items nicely.But on second thought everything might be easier if I use boxsizers only.
Use the source, Luke!