Silverfrost Forums

Welcome to our forums

ToolTip (%th) - Does hiding work?

4 Jul 2015 4:12 #16549

I have been playing around with tool tips (%th) and want to allow the user to hide it. My code reads (in part):

  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

4 Jul 2015 6:41 #16551

Possibly. Try leaving out ms_style and/or balloon and let me know what happens.

4 Jul 2015 1:51 #16552

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.

6 Jul 2015 10:51 #16553

I have logged this for investigation.

6 Jul 2015 1:09 #16554

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

26 May 2016 3:15 #17520

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...

  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
30 May 2016 11:08 #17523

I never know when you do need an explicit window_update@, and when you don't. Is there a list anywhere?

Eddie

30 May 2016 1:33 #17524

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.

Please login to reply.