I have done some more experimenting. Yes, I cannot get 'balloon help' on menu selections. I can deal with that. But, in some windows I can get the balloon help, others not, so I did some digging. And some experimenting.
Case 1: A window with a menu item that has a help string and a button that has a help string. %th is specified.
Result: There is no status bar and no help for the menu item is shown. The control shows the balloon help. Not expected.
Case 2: A child window is created with %th. The parent window is created with a menu item having a help string, assuming the 'default' help action.
Result: There is a status bar, and the menu item help is displayed there, and the button help is a balloon. Expected.
Case 3: A window with a menu item having no help string and a button with a help string and %th specified.
Result: There is no status bar created. The control has balloon help. Expected.
Case 4: A window with a menu item that has a help string and a button that has a help string. The default help action is assumed.
Result: Status bar shows the menu help and the control help. Expected
The only way to guarantee balloon help for the contents of a window is to create a child that is included either as %ch or in a %ps. In both of those cases, including the %th for bubble help does allow this form of help while retaining the 'standard' help for menu items.
In my operational code, however, Case 3 occurs often, yet the help strings for controls are displayed in the status bar on the bottom along with menu item help (if included). I have been unable to create a set of windows and interactions that duplicate this problem.
Has anyone else run across this behavior?
While easy to place the main portion of the window into a child, there are a LOT of windows, so I'm looking for a reason that explains the different behavior or I spend a lot of time reworking the window creation.
winapp
use mswin
integer:: i,child
integer,external:: my_callback
! Single window with %th
! menu item help is not displayed
i = winio@('%ww&')
i = winio@('%?mn[Menu Item[Sub-Item]][This is a sub-item]&',my_callback)
i = winio@('Window case 1%nl%ff&')
i = winio@('%?bt[This is a button][This is helpful]&')
i = winio@('%th[ms_style,balloon]&',1)
i = winio@('')
! Results: Menu HELP is not displayed, bubble help is displayed for button
!----------------------------
! Create a child window and set %th for HELP
i = winio@('%sh&',child)
i = winio@('%?bt[This is a button][This is helpful]&')
i = winio@('%th[ms_style,balloon]&',1)
i = winio@('')
! Create a window, and include the child window
! No specific HELP specified in the main window
i = winio@('%ww&')
i = winio@('%?mn[Menu Item[Sub-Item]][This is a sub-item]&',my_callback)
i = winio@('Window case 2%nl%ff&')
i = winio@('%ch&',child)
i = winio@('')
! Results: Menu help displayed at bottom (default)
! Bubble help is shown for the button
!----------------------------
! Single window with %th
! menu item help is not displayed
i = winio@('%ww&')
i = winio@('%mn[Menu Item[Sub-Item]]&',my_callback)
i = winio@('Window case 3%nl%ff&')
i = winio@('%ob&')
i = winio@('%?bt[This is a button][This is helpful]&')
i = winio@('%cb&')
i = winio@('%th[ms_style,balloon]&',1)
i = winio@('')
! Result: No status bar. Control has balloon help displayed
!----------------------------
! Single window with no specific help action (default)
i = winio@('%ww&')
i = winio@('%?mn[Menu Item[Sub-Item]][This is a sub-item]&',my_callback)
i = winio@('Window case 4%nl%ff&')
i = winio@('%?bt[This is a button][This is helpful]&')
i = winio@('')
! Result: Status bar shows the menu help and the control help
stop
end
integer function my_callback()
my_callback = 1
return
end