I just noticed something strange when using a status bar under GTK on Linux. The status bar seems to be being drawn over the control that's at the bottom of the window. I'm calling Fit() on my window before showing it so it's as small as it needs to be to display everything. The first screenshot is the window on Linux and the second is on Windows. Both windows are created using the same code.
I'm using wxWidgets 3.1.0.
wxStatusBar overlaps the control at the bottom of the form Topic is solved
-
- Experienced Solver
- Posts: 74
- Joined: Sat May 06, 2017 1:40 pm
Re: wxStatusBar overlaps the control at the bottom of the form
Hi,
What is you wx version?
What is you OS/version?
Do you use GTK+2 or GTK+3?
What is exact GTK+ version?
Can you post some code so that we can check it?
Thank you.
What is you wx version?
What is you OS/version?
Do you use GTK+2 or GTK+3?
What is exact GTK+ version?
Can you post some code so that we can check it?
Thank you.
-
- Experienced Solver
- Posts: 74
- Joined: Sat May 06, 2017 1:40 pm
Re: wxStatusBar overlaps the control at the bottom of the form
As I stated in my original post, I'm using wxWidgets 3.1.0.
I'm running Linux Mint 18.2.
I built wxWidgets against GTK+3.
After issuing this command, "dpkg -l libgtk* | grep -e '^i' | grep -e 'libgtk-*[0-9]'", it appears I have 3.18.9 of GTK+ installed.
Here is some of the code I'm using to create the window.
I'm running Linux Mint 18.2.
I built wxWidgets against GTK+3.
After issuing this command, "dpkg -l libgtk* | grep -e '^i' | grep -e 'libgtk-*[0-9]'", it appears I have 3.18.9 of GTK+ installed.
Here is some of the code I'm using to create the window.
Code: Select all
auto mainSizer = new wxBoxSizer(wxVERTICAL);
wxStatusBar* statusBar;
statusBar = this->CreateStatusBar(3);
statusBar->SetStatusText("Player Name", 0);
statusBar->SetStatusText("Current Round", 1);
statusBar->SetStatusText("Rolls Left", 2);
this->SetSizer(mainSizer);
this->Fit();
this->Centre();
Dave F.
Re: wxStatusBar overlaps the control at the bottom of the form
Hi,
Do you use any non-standard themes?
Thank you.
Do you use any non-standard themes?
Thank you.
-
- Experienced Solver
- Posts: 74
- Joined: Sat May 06, 2017 1:40 pm
Re: wxStatusBar overlaps the control at the bottom of the form
I am using the default Linux Mint theme. The window manager is Cinnamon, if that makes any difference.
Dave F.
Re: wxStatusBar overlaps the control at the bottom of the form
Hi,
It is possible.
Can you try wxWidgets samples and see if it reproducible there?
Just try all of them - I don't remember which one has a big screen.
Also, if you take out status bar is it working properly?
Thank you.
It is possible.
Can you try wxWidgets samples and see if it reproducible there?
Just try all of them - I don't remember which one has a big screen.
Also, if you take out status bar is it working properly?
Thank you.
-
- Experienced Solver
- Posts: 74
- Joined: Sat May 06, 2017 1:40 pm
Re: wxStatusBar overlaps the control at the bottom of the form
I ran several of the samples and the ones with status bars showed up properly. As I was looking at my code I realized that there was one difference between the code I had on Windows and the code on Linux. The Windows project calls SetSizerAndFit() on the window whereas the Linux project calls SetSizer() and then calls Fit(). When I changed the Linux project to call SetSizerAndFit(), the overlap went away.
One would think that calling SetSizerAndFit() would have the same effect as calling SetSizer() and then calling Fit().
One would think that calling SetSizerAndFit() would have the same effect as calling SetSizer() and then calling Fit().
Dave F.