[PB5.10] Underline Buttontext

Just starting out? Need help? Post your questions and find answers here.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

[PB5.10] Underline Buttontext

Post by ts-soft »

With XP-Style enabled, the first Signs of Buttontext is underlined after pressing ALT-Key, but the
underline doesn't go away after none pressing ALT-Key.

Without XP-Style the first Signs of Buttontext is underlined without pressing anything (correct) but
the underline is gone after filerequester and doesn't come back after closing filerequester.

On Linux is never a underlined Buttontext.

Examplesource:

Code: Select all

EnableExplicit

OpenWindow(0, #PB_Ignore, #PB_Ignore, 640, 480, "")

ButtonGadget(0, 10, 10, 200, 25, "&Test Button")

Repeat
  Select WaitWindowEvent()
    Case #PB_Event_CloseWindow
      Break
    Case #PB_Event_Gadget
      Select EventGadget()
        Case 0
          OpenFileRequester("", "", "", 0)
      EndSelect
  EndSelect
ForEver
see here in german forum: http://www.purebasic.fr/german/viewtopi ... 81#p309381
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User_Russian
Addict
Addict
Posts: 1520
Joined: Wed Nov 12, 2008 5:01 pm
Location: Russia

Re: [PB5.10] Underline Buttontext

Post by User_Russian »

Code: Select all

EnableExplicit

OpenWindow(0, #PB_Ignore, #PB_Ignore, 640, 480, "")

ButtonGadget(0, 10, 10, 200, 25, "&Test Button")

SetActiveGadget(0)
SendMessage_(WindowID(0), #WM_UPDATEUISTATE, $30002,0)

Repeat
  Select WaitWindowEvent()
    Case #PB_Event_CloseWindow
      Break
    Case #PB_Event_Gadget
      Select EventGadget()
        Case 0
          OpenFileRequester("", "", "", 0)
      EndSelect
  EndSelect
ForEver
User avatar
VB6_to_PBx
Enthusiast
Enthusiast
Posts: 627
Joined: Mon May 09, 2011 9:36 am

Re: [PB5.10] Underline Buttontext

Post by VB6_to_PBx »

Code: Select all


EnableExplicit

OpenWindow(0, #PB_Ignore, #PB_Ignore, 640, 480, "")

ButtonGadget(0, 10, 10, 200, 25, "&Test Button")
SetActiveGadget(0)
SendMessage_(WindowID(0), #WM_UPDATEUISTATE, $30002,0)

Repeat
    Select WaitWindowEvent()
    Case #PB_Event_CloseWindow
         Break
    Case #PB_Event_Gadget
         Select EventGadget()
         Case 0
              OpenFileRequester("", "", "", 0)
              SendMessage_(WindowID(0), #WM_UPDATEUISTATE, $30002,0)
         EndSelect
    EndSelect
ForEver
 
PureBasic .... making tiny electrons do what you want !

"With every mistake we must surely be learning" - George Harrison
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: [PB5.10] Underline Buttontext

Post by ts-soft »

Thanks, but this is a bugreport, i am not searching for a workaround.
This bug is new to PB5.x
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
dige
Addict
Addict
Posts: 1392
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: [PB5.10] Underline Buttontext

Post by dige »

Its not a bug, its a feature. And please do not change it
again - we had big redraw and flicker problem...
"Daddy, I'll run faster, then it is not so far..."
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Re: [PB5.10] Underline Buttontext

Post by ABBKlaus »

dige is correct, its not solved through the windows standard method IsDialogMessage().

PB uses somes tricks to make it visible : SetUIState()

The only thing that makes the focusrectangle disappear again is the LostFocus event.
User avatar
NicTheQuick
Addict
Addict
Posts: 1504
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: [PB5.10] Underline Buttontext

Post by NicTheQuick »

With Linux Mint 14 x64 the text on the button is "&Open" and not "Open". This is a bug! It's the wrong bug report forum in this case, but still a bug.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: [PB5.10] Underline Buttontext

Post by ts-soft »

Okay, I understand, if a Workaround generates a bug for another bug, this is no bug :?
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
Post Reply