wxStatusBar overlaps the control at the bottom of the form Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
fishnet37222
Experienced Solver
Experienced Solver
Posts: 74
Joined: Sat May 06, 2017 1:40 pm

wxStatusBar overlaps the control at the bottom of the form

Post by fishnet37222 »

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.
2017-09-08_10-18-06.png
2017-09-08_10-18-06.png (42.52 KiB) Viewed 2223 times
2017-09-08_10-22-13.png
2017-09-08_10-22-13.png (22.69 KiB) Viewed 2223 times
Dave F.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxStatusBar overlaps the control at the bottom of the form

Post by ONEEYEMAN »

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.
fishnet37222
Experienced Solver
Experienced Solver
Posts: 74
Joined: Sat May 06, 2017 1:40 pm

Re: wxStatusBar overlaps the control at the bottom of the form

Post by fishnet37222 »

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.

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.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxStatusBar overlaps the control at the bottom of the form

Post by ONEEYEMAN »

Hi,
Do you use any non-standard themes?

Thank you.
fishnet37222
Experienced Solver
Experienced Solver
Posts: 74
Joined: Sat May 06, 2017 1:40 pm

Re: wxStatusBar overlaps the control at the bottom of the form

Post by fishnet37222 »

I am using the default Linux Mint theme. The window manager is Cinnamon, if that makes any difference.
Dave F.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxStatusBar overlaps the control at the bottom of the form

Post by ONEEYEMAN »

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.
fishnet37222
Experienced Solver
Experienced Solver
Posts: 74
Joined: Sat May 06, 2017 1:40 pm

Re: wxStatusBar overlaps the control at the bottom of the form

Post by fishnet37222 »

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().
Dave F.
Post Reply