Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2017-07

TStatusBar initialization problem.

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Donald Ziesig

Hi Everyone!

I am writing a new app that will use a StatusBar at the bottom of the main window (just like I have done many times in the past - with both Delphi and Lazarus). Strangely enough, even though I have nothing but the gui implemented (no app specific code, etc.), the StatusBar does NOT display until I manually resize the main window, at which time, it appears as appropriate with its two panels visible. To isolate the problem further, I temporarily set the color to blue to see if it were only panel contents that were not showing. In this test, the blue status bar again does not appear until the main form is manually resized.

I have tried a number of hacks, such as programatically changing the Height and/or Width during 1) OnCreate, 2) OnShow, 3) OnPaint, 4) OnTimer (added a hack timer and tried resizing during the event). None of these worked :-(.

I am running Lazarus 1.9 dated 2017-04-17 with high resolution (144 DPI), FPC 3.0.2 (I think I am running the qt toolset, but don't know how to determine that.) This mostly works well (I have a few minor problems with the internal sizing of some controls and control-editors).

Does anyone have an idea for a work around, or suggestions as to where to find the code for TStatusBar?

Thanks,

Don Ziesig

Reply by email

C Western
to Donald Ziesig
Donald Ziesig wrote 11 lines
Hi Everyone! I am writing a new app that will use a StatusBar at the bottom of the main window (just like I have done many times in the past - with both Delphi and Lazarus). Strangely enough, even though I have nothing but the gui implemented (no app specific code, etc.), the StatusBar does NOT display until I manually resize the main window, at which time, it appears as appropriate with its two panels visible. To isolate the problem further, I temporarily set the color to blue to see if it were only panel contents that were not showing. In this test, the blue status bar again does not appear until the main form is manually resized.

https://bugs.freepascal.org/view.php?id=31621 is similar. My issue seems related to changes to the form as it is being created; you don't say of you are doing something along these lines.

Unfortunately the re-sizing code is sufficiently complicated I haven't been able to identify any solutions.

Colin

Reply by email