checkbox tooltip disappears after click

Post bugreports for the Windows version here
User avatar
Kukulkan
Addict
Addict
Posts: 1352
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

checkbox tooltip disappears after click

Post by Kukulkan »

Hi,

The following example shows the problem (Windows PB 4.20):

Code: Select all

If OpenWindow(0, 0, 0, 320, 160, "Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0))
  
  TextGadget(0, 10,  10, 300, 20, "TextGadget with ToolTip. But nothing is shown.")
  CheckBoxGadget(1, 10, 30, 300, 20, "Checkbox with ToolTip. Click, and tooltip disappears.")
  
  ; set Tooltip to TextGadget
  GadgetToolTip(0, "this is a tooltip")
  
  ; set Tooltip to CheckBoxGadget
  GadgetToolTip(1, "this is a tooltip")
  
  Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
  
EndIf
At first, the CheckBoxGadget has a working tooltip. After clicking the CheckBoxGadget, the tooltip disappears. I need to call GadgetTooltip() after every click to get rid of this :(

Can anyone confirm this?

By the way, is it possible to add tooltips to TextGadgets, too? Like in the example above?

Kukulkan
maw

Post by maw »

The tooltip does disappear when clicking, that is normal behavior. Move the mousepointer away from the gadget and back again and the tooltip reappears.

As for tooltips on textgadgets, this is not supported. From the help on TextGadget: "Note: This Gadget doesn't receive any user events, and GadgetToolTip() can't be used with it"
User avatar
Kukulkan
Addict
Addict
Posts: 1352
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Post by Kukulkan »

Move the mousepointer away from the gadget and back again and the tooltip reappears.
Not here. This is the point. It never comes back.

I have no problem, if the tooltip disappears while clicking. But it seem to be deleted after clicking. Have you tested using the code above? I need to call GadgetTooltip() to re-set the tooltip.

Kukulkan
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

yes, this is strange.
seems the tooltip-recall is deactivated.
apparently, another ShowToolTip-event has to take place to reactivate the first,
if there is no other Tooltip on the window, the tooltip never reactivates.

Code: Select all

If OpenWindow(0, 0, 0, 320, 160, "Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0))
 
  TextGadget(0, 10,  10, 300, 20, "TextGadget with ToolTip. But nothing is shown.")
  CheckBoxGadget(1, 10, 30, 300, 20, "Checkbox1 with ToolTip.")
  CheckBoxGadget(2, 10, 50, 300, 20, "Checkbox2 with ToolTip.")
 
  ; set Tooltip to TextGadget
  GadgetToolTip(0, "this is a tooltip")
 
  ; set Tooltip to CheckBoxGadget
  GadgetToolTip(1, "tooltip of Checkbox1")
  GadgetToolTip(2, "tooltip of Checkbox2")

   Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
 
EndIf
oh... and have a nice day.
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

CheckBoxGadget tooltip works fine here. :?

As for the TextGadget/Tooltip question, try adding the #SS_NOTIFY flag to your TextGadget.
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

Ok, with XP skins enabled I see the problem.
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
maw

Post by maw »

Well, I'm running Vista (x64) with classic theme so that could explain it!
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

I run XP in classic theme, think that counts as a skin, too.
oh... and have a nice day.
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: checkbox tooltip disappears after click

Post by PB »

@Kukulkan: do any other non-PureBasic apps exhibit the same problem?
If so, then it's a Windows problem, and not a PureBasic bug.
User avatar
Kukulkan
Addict
Addict
Posts: 1352
Joined: Mon Jun 06, 2005 2:35 pm
Location: germany
Contact:

Post by Kukulkan »

Hi,

No other Problems detected (VB6 Application etc.) here. If I use the example of Kaeru, everything works as expected. But if I comment the lines for the second CheckBoxGadget, the error is here again.

One CheckBoxGadget -> Error
Two CheckBoxGadgets -> Fine

Kaeru described best (I think):
seems the tooltip-recall is deactivated.
apparently, another ShowToolTip-event has to take place to reactivate the first,
if there is no other Tooltip on the window, the tooltip never reactivates.
Strange...

@Sparkie: #SS_NOTIFY flag worked fine. Thanks.

Kukulkan
User avatar
Kaeru Gaman
Addict
Addict
Posts: 4826
Joined: Sun Mar 19, 2006 1:57 pm
Location: Germany

Post by Kaeru Gaman »

it's not the Gadget but the Tooltip.
if you just disable the second tooltip but let the second gadget appear, the error occurs, too.
window needs at least two tooltips to reactivate each other.
#SS_NOTIFY flag worked fine.
so, is it a bug in the theming or in PB? *pondering*
oh... and have a nice day.
User avatar
Demivec
Addict
Addict
Posts: 4091
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Post by Demivec »

I don't have any problems with displaying the tooltip repeatedly after clicking the checkbox. Using Windows XP. Using Classic theme.
byo
Enthusiast
Enthusiast
Posts: 635
Joined: Mon Apr 02, 2007 1:43 am
Location: Brazil

Post by byo »

Yes, this is expected behaviour on Windows XP with themes enabled. It's not a Purebasic bug. I'm not sure why Microsoft hasn't fixed that yet.
Proud registered Purebasic user.
Because programming should be fun.
Post Reply