View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0019905||Lazarus||LCL||public||2011-08-05 20:42||2020-11-14 17:47|
|Reporter||Flávio Etrusco||Assigned To|
|Product Version||0.9.31 (SVN)|
|Summary||0019905: Custom TBitBtn in IDE forms doesn't show glyph on Win32 unless ShowMode is gsmAlways|
|Description||Inside the Lazarus IDE or a plugin/package, a TBitBtn doesn't show the Glyph by default on Win32 (Lazarus is configured to use OS settings).|
On a new application the Glyph is displayed by default.
BTW is gsmApplication really the best default for GlyphShowMode?
Can we add some "intelligence" for displaying the glyph if Text is empty?
[EDIT] clearing up:
Shouldn't we always display the glyph if Text is empty?
Steps to reproduce:
1) Open an IDE form (e.g. the AboutForm);
2) Add a TBitBtn in there and add a glyph to it;
3) Configure the IDE (in Options Dialog) to always show glyphs;
4) Open the AboutForm.
The TBitBtn doesn't display the glyph.
Curiously the glyph is shown for non-custom TBitBtn (e.g. the close button in the AboutForm).
|Tags||No tags attached.|
|Fixed in Revision|
I fail to see where is the bug here. To be honest I think, that current behavior is OK.
After all, showing glyph by default is quite logical for BitBtn, regardless of Lazarus interface decisions, don't you think?
Hmm, agreed? The report is about the opposite. My fault actually, the description is far from clear - even I thought it was about the behavior in design-time or something. This bug is about some weirdness in the gsmApplication mode or the IDE project, where a TBitBtn placed in an IDE form only shows glyphs at runtime if GlyphShowMode is gsmAlways.
Indeed, the problem happens with Lazarus project only!
If I add a TBitBtn into a Lazarus IDE form (like the AboutForm) and select an image, it shows ok at design time but not at run time after compiling Lazarus.
If I do the exact same thing for any other project, then it works! The image shows also at run time.
The problem happens only on Windows. On Linux / GTK2 the image shows always.
How is it possible? Lazarus is supposed to use TBitBtn the same way as any other LCL application.
@Maxim: you must have misunderstood the issue.
For the IDE Application.ShowButtonGlyphs returns sbgSystem
In function TButtonGlyph.CanShow if Application.ShowButtonGlyphs is sbgSystem the result will be SystemShowButtonGlyphs.
function SystemShowButtonGlyphs: Boolean; inline;
Result := ThemeServices.GetOption(toShowButtonImages) = 1;
// force False on windows since gtk and qt can return True
Result := False;
So the glyph will not be shown if ShowMode = gsmApplication.
In a default application the value of Application.ShowButtonGlyphs on Windows is sbgAlways.
This explains the different behaviour between the IDE and a "normal" application.
|2011-08-05 20:42||Flávio Etrusco||New Issue|
|2011-08-05 20:42||Flávio Etrusco||LazTarget||=> -|
|2011-08-05 20:42||Flávio Etrusco||Widgetset||=> Win32/Win64|
|2011-10-08 01:53||Maxim Ganetsky||Status||new => resolved|
|2011-10-08 01:53||Maxim Ganetsky||Resolution||open => no change required|
|2011-10-08 01:53||Maxim Ganetsky||Assigned To||=> Maxim Ganetsky|
|2011-10-08 01:53||Maxim Ganetsky||Note Added: 0052762|
|2011-10-08 01:59||Maxim Ganetsky||Note Edited: 0052762|
|2011-10-08 03:51||Flávio Etrusco||Note Added: 0052765|
|2011-10-08 03:52||Flávio Etrusco||Note Edited: 0052765|
|2011-10-08 03:52||Flávio Etrusco||Assigned To||Maxim Ganetsky =>|
|2011-10-08 03:52||Flávio Etrusco||Status||resolved => assigned|
|2011-10-08 03:52||Flávio Etrusco||Resolution||no change required => reopened|
|2011-10-08 04:03||Flávio Etrusco||Reproducibility||have not tried => always|
|2011-10-08 04:03||Flávio Etrusco||Description Updated|
|2011-10-08 04:06||Flávio Etrusco||Summary||Inside Lazarus, TBitBtn in doesn't show Glyph by default on Win32 => Custom TBitBtn in IDE forms doesn't show glyph on Win32 unless ShowMode is gsmAlways|
|2011-10-08 10:22||Flávio Etrusco||Status||assigned => new|
|2011-10-09 11:21||Juha Manninen||Note Added: 0052793|
|2011-10-09 11:21||Juha Manninen||Status||new => confirmed|
|2020-11-14 17:47||Bart Broersma||Note Added: 0126937|