Recent

Author Topic: GTK2: hint not showing for disabled control  (Read 513 times)

zoltanleo

  • Sr. Member
  • ****
  • Posts: 486
GTK2: hint not showing for disabled control
« on: May 25, 2022, 05:46:56 pm »
Hi all.

I found a slightly strange behavior of the hint property for a disabled control. For win32/Сocoa widgetsets hint is displayed, for gtk2 it is not displayed.

Code: Pascal  [Select][+][-]
  1. procedure TForm1.FormCreate(Sender: TObject);
  2. begin
  3.   with btnEnabled do
  4.   begin
  5.     ShowHint:= True;
  6.     Enabled:= True;
  7.     Hint:= 'This is an enabled control';
  8.   end;
  9.  
  10.   with btnDisabled do
  11.   begin
  12.     ShowHint:= True;
  13.     Enabled:= False;
  14.     Hint:= 'This is disabled control';
  15.   end;
  16. end;

What behavior is considered a bug?
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by TonyW

Sorry for my bad English, I'm using translator ;)

zoltanleo

  • Sr. Member
  • ****
  • Posts: 486
Re: GTK2: hint not showing for disabled control
« Reply #1 on: May 25, 2022, 05:49:31 pm »
linux behavior

https://i.imgur.com/bMnSfsq.gif

+ test project
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by TonyW

Sorry for my bad English, I'm using translator ;)

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: GTK2: hint not showing for disabled control
« Reply #2 on: May 25, 2022, 05:55:33 pm »
It works on qt,qt5,win32 and cocoa, so it's definitelly bug. Please open issue at bugtracker and attach provided project1.zip from here.

zoltanleo

  • Sr. Member
  • ****
  • Posts: 486
Win10 LTSC x64/Deb 11 amd64(gtk2/qt5)/Darwin Cocoa (Monterey):
Lazarus x32/x64 2.3(trunk); FPC 3.3.1 (trunk), FireBird 3.0.10; IBX by TonyW

Sorry for my bad English, I'm using translator ;)

 

TinyPortal © 2005-2018