Sign in Join

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

Mailing lists / lazarus / 2015-04

Trouble understanding StatusBar panels

9 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Graeme Geldenhuys

Hi,

I've defined 3 panels in a status bar. For each panel I have set their widths, yet at runtime they all seem "auto-sized" and shrink, then end up being squashed on the left of the status bar.

eg:

+-----------------------------------------+
| str1 | str2 | str3 |
+-----------------------------------------+

What I want (by setting the widths of each panel) is the following:

+-----------------------------------------+
| str1 | str2 | str3 |
+-----------------------------------------+

It seems LCL simply ignores the fact that I set panel widths. How do I fix the panel layout in LCL?

ps:
I don't actually want text in the 3rd panel, I want to draw a image. The image must always appear on the right edge of the statusbar.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Bart
to Graeme Geldenhuys
Graeme Geldenhuys wrote 5 lines
Hi, I've defined 3 panels in a status bar. For each panel I have set their widths, yet at runtime they all seem "auto-sized" and shrink, then end up being squashed on the left of the status bar.

I cannot reproduce that on Windows (Lazarus 1.5 r48507 FPC 2.6.4 i386-win32-win32/win64), and AFAIK this has worked as expected for a long time.

See attached image.
Panel widths are set to 50, 100, 150 and default (50) for last one.

Bart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: statusbar.png
Type: image/png
Size: 2832 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20150401/853bfd6c/attachment.png>

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys: I've defined 3 panels in a status bar. For each panel I have set their widths, yet at…
Graeme Geldenhuys wrote
It seems LCL simply ignores the fact that I set panel widths. How do I fix the panel layout in LCL?

I just tested under Delphi 7 and Delphi XE - in both cases if I set a StatusBar panel width, the program adheres to my settings. So this seems broken in LCL.

I'm using Lazarus 1.3 r45395 FPC 2.6.4 x86_64-linux-gtk 2, and not the latest Trunk because too many things have gone broken (usability wise) in Lazarus since then. But if I really must, I guess I can move my development back to the latest Trunk code.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Tony Whyman
to Graeme Geldenhuys: LCL-GTK2. But it needs to work with LCL-Win32/64 as well, but I haven't tested this app…

This one annoys me as well but is a documented issue in the wiki

see
http://wiki.freepascal.org/Lazarus_known_issues_%28things_that_will_never_be_fixed%29#TStatusBar_Panels_2

"The TStatusPanel.Bevel and TStatusPanel.Alignment properties are ignored by all platforms except Windows."

Graeme Geldenhuys wrote 10 lines
On 2015-04-01 12:09, zeljko wrote: > Widgetset ? LCL-GTK2. But it needs to work with LCL-Win32/64 as well, but I haven't tested this app under Windows yet. Regards, - Graeme -

Reply by email

Graeme Geldenhuys
to Tony Whyman
Tony Whyman wrote

Ah crap - and then people still wonder why I rather develop with fpGUI instead of LCL. Thanks for the info though.

And sadly, based on the link included in that wiki text, I reported the issue back in Jan 2010. :-)

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

zeljko
to Tony Whyman: This one annoys me as well but is a documented issue in the wiki see…
Tony Whyman wrote 8 lines
This one annoys me as well but is a documented issue in the wiki see http://wiki.freepascal.org/Lazarus_known_issues_%28things_that_will_never_be_fixed%29#TStatusBar_Panels_2 "The TStatusPanel.Bevel and TStatusPanel.Alignment properties are ignored by all platforms except Windows."

That's wrong. Qt can align text of panels, but also it can have bevel :) Only, I'm not sure if I implemented that :)

zeljko

Reply by email

Graeme Geldenhuys
to Bart: I cannot reproduce that on Windows (Lazarus 1.5 r48507 FPC 2.6.4 i386-win32-win32/win64),…
Bart wrote
I cannot reproduce that on Windows (Lazarus 1.5 r48507 FPC 2.6.4 i386-win32-win32/win64), and AFAIK this has worked as expected for a long time.

Yes, but that obviously doesn't mean it works everywhere else. Later in the day I tested under Windows too, and like you said it works on that LCL widgetset. So it seems like another LCL-GTK2 issue (inconsistency). I don't have Qt setup, so can't test the LCL-QT widgetset.

Is there any LCL test suite that can check for these things [inconsistencies] between widgetsets? If not, something should really be put in place, otherwise the Lazarus team have no way of gauging what works and what doesn't on each LCL target.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email