View previous topic :: View next topic |
Author |
Message |
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Sat Jul 04, 2015 5:12 am Post subject: ToolTip (%th) - Does hiding work? |
|
|
I have been playing around with tool tips (%th) and want to allow the user to hide it. My code reads (in part):
Code: | i = winio@("%th[ms_style,delay,balloon]&',tool_tip_enabled,750L) ! delay 3/4 second
|
But setting tool_tip_enabled to 0, the help text still appears.
Is one of the options interfering with the disable of help text?
Bill |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7916 Location: Salford, UK
|
Posted: Sat Jul 04, 2015 7:41 am Post subject: |
|
|
Possibly. Try leaving out ms_style and/or balloon and let me know what happens. |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Sat Jul 04, 2015 2:51 pm Post subject: |
|
|
Removing ms_style alone had no effect on the enable/disable.
Removing balloon alone had no effect on the enable/disable.
Only when BOTH options have been removed does the enable/disable have an effect. "delay" was left as an option.
With "delay" removed, and the other options individually present, the enable/disable variable is still not honored. |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7916 Location: Salford, UK
|
Posted: Mon Jul 06, 2015 11:51 am Post subject: |
|
|
I have logged this for investigation. |
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Mon Jul 06, 2015 2:09 pm Post subject: |
|
|
It's some time since I programmed this part of an application, so I looked back on what I'd done. I saw from my program comments that I had toyed with having a programme option to turn off %th, but in the end settled for having it permanently enabled, but only for unlabelled icons in toolbars as labelled buttons have descriptive text anyway.
I see that I checked the OS version, and didn't use ms_style for XP or 2000.
I also looked at various applications, and noted that where the toolbars used small icons close together, the delays were smaller (300) than where the icons were bigger and wider apart where I'd gone for longer delays (up to 1500). Where the icons are smaller and closer together you need a shorter delay so that the tool help doesn't appear laggy, but you need sufficient delay so that an experienced user isn't bothered by the tool help - they go straight for the button and press it and don't see the message. This is an alternative to having them on or off as a user option. User tolerance for a delay seems increased for larger, wider-apart, icons. Odd.
It has long interested me that %th popups show for all %ib buttons, whether greyed or not, but only for active %tb buttons.
I have used %tt buttons (which don't need %th because they are text already) for a toolbar, but find that the combination of an icon with text in a %bb button is even better.
Eddie |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7916 Location: Salford, UK
|
Posted: Thu May 26, 2016 4:15 pm Post subject: |
|
|
It turns out that you need an explicit call to window_update@ after changing the value of the enabling variable. Also %th was not working for me for 64 bit code and this has been fixed. Here is a sample which should work with the current release for 32 bit code...
Code: | winapp
integer i,winio@,tool_tip_enabled
common tool_tip_enabled
integer,external::cb
tool_tip_enabled = 1
i = winio@("%th[ms_style]&",tool_tip_enabled)
i = winio@("%^?bt[Button][Help string]",cb)
end
integer function cb()
integer tool_tip_enabled
common tool_tip_enabled
tool_tip_enabled = 1 - tool_tip_enabled
call window_update@(tool_tip_enabled)
cb = 2
end |
|
|
Back to top |
|
|
LitusSaxonicum
Joined: 23 Aug 2005 Posts: 2388 Location: Yateley, Hants, UK
|
Posted: Mon May 30, 2016 12:08 pm Post subject: |
|
|
I never know when you do need an explicit window_update@, and when you don't. Is there a list anywhere?
Eddie |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7916 Location: Salford, UK
|
Posted: Mon May 30, 2016 2:33 pm Post subject: |
|
|
Eddie
No, I don't know of one. If anyone knows of situations where an explicit call is required then I could create a list and put it in the help file. |
|
Back to top |
|
|
|