forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help for menu items

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
wahorger



Joined: 13 Oct 2014
Posts: 1054
Location: Morrison, CO, USA

PostPosted: Sat Jul 30, 2022 12:07 am    Post subject: Help for menu items Reply with quote

I have help strings associated with all my menu items. I would like for them to appear as pop-up help. That doesn't happen.

At the end of building the window, I set %th[ms_style,balloon]. This will show the help for controls, etc. as balloons. However, none of the help for menu items appears.

If I comment out the %th, then I can get help for the menu items, but they appear at the bottom of the window (status bar?).

So, the question is: Can I get balloon help for the window's menu items AND the individual controls? Should I be using %bh instead/also?

TIA,
Bill
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7376
Location: Salford, UK

PostPosted: Sat Jul 30, 2022 2:15 pm    Post subject: Reply with quote

Bill

As a rule menu help items appear in the status bar. That is what you get with the Windows API and is "normal" in Windows applications.

I suggest that you avoid %bh. %th is better and does essentially the same thing.

I don't recall seeing "popup" help windows for menu items in any Windows application. In theory you could do it but it might be unique to your application.
Back to top
View user's profile Send private message AIM Address
LitusSaxonicum



Joined: 23 Aug 2005
Posts: 2337
Location: Yateley, Hants, UK

PostPosted: Sat Jul 30, 2022 2:59 pm    Post subject: Reply with quote

Bill,

While Paul was replying I was looking through a range of Windows applications (including some I wrote) to see if any of them used pop up help messages on the menus, and I couldn't find one. It was new to me that the default is to put help info in the status bar when it applies to menus, something I need to think about.

I certainly have it for toolbars, and have found it useful also to have the option to switch it off, and in any case, to delay the start of %th by 300 millisec.

On the other hand, FTN95.CHM does give the impression that help strings are an option, even though it doesn't tell you to use the status bar.

Eddie
Back to top
View user's profile Send private message
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7376
Location: Salford, UK

PostPosted: Sun Jul 31, 2022 6:31 am    Post subject: Reply with quote

ClearWin+ provides help for menu items either in the status bar or by using %he to specify the position of the help text.

For a status bar you can use %`sb or maybe %ob[status].
Back to top
View user's profile Send private message AIM Address
wahorger



Joined: 13 Oct 2014
Posts: 1054
Location: Morrison, CO, USA

PostPosted: Sun Jul 31, 2022 3:23 pm    Post subject: Reply with quote

Thanks for the various options, Paul and Eddie. I'm believing I was simply mistaken that I could get this "effect" from menu items. After looking through various applications, those that have this "feature" do not have them available from the menu line; they have a programmed "tool bar" or such.

This came up as I was stepping through a problem solution with a user. He is somewhat familiar with computers, but has difficulty determining the proper menu option to select; this sometimes "takes him down the rabbit hole", and he gets frustrated. What he is missing is the HELP strings appearing at the bottom of the window from his menu list selections.

And he is not the only one of my users that has this issue.

Short of providing my own toolbars (like Word or Excel), I look for potential ways to keep my users on track, and minimize the calls for simple items like "what do I select to ....?"

I think what is provided is working as advertised; I may need to train my users better in navigating the application!!
Back to top
View user's profile Send private message Visit poster's website
wahorger



Joined: 13 Oct 2014
Posts: 1054
Location: Morrison, CO, USA

PostPosted: Mon Aug 01, 2022 4:24 am    Post subject: Reply with quote

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.

[code:1:f1d2f26aa9]
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@(''&#
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7376
Location: Salford, UK

PostPosted: Mon Aug 01, 2022 6:22 am    Post subject: Reply with quote

Bill

Your post has been truncated so some of the sample code is missing.
Back to top
View user's profile Send private message AIM Address
wahorger



Joined: 13 Oct 2014
Posts: 1054
Location: Morrison, CO, USA

PostPosted: Mon Aug 01, 2022 12:48 pm    Post subject: Reply with quote

Dang!

Code:

   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
       
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7376
Location: Salford, UK

PostPosted: Tue Aug 02, 2022 7:38 am    Post subject: Reply with quote

Bill

You have spotted an anomaly that has now been corrected for the next release of the DLLs.

A default %he should be added for you. At the moment this does not happen when tooltips are used.

Until you get the corrected ClearWin+ you have to provide an explicit %he, then you get a tooltip for the button and a "status" window from %he for the menu item. Alternatively you can use %`sb.

Code:
winapp
program main
 i = winio@('%?mn[Menu Item[Sub-Item]][This is a sub-item]&', "continue")
 i = winio@('%?bt[This is a button][This is helpful]&')
 i = winio@('%th[balloon]&',1)
 i = winio@('%ff%nl%he')
end program main
Back to top
View user's profile Send private message AIM Address
wahorger



Joined: 13 Oct 2014
Posts: 1054
Location: Morrison, CO, USA

PostPosted: Tue Aug 02, 2022 1:35 pm    Post subject: Reply with quote

Thanks, Paul!
Back to top
View user's profile Send private message Visit poster's website
wahorger



Joined: 13 Oct 2014
Posts: 1054
Location: Morrison, CO, USA

PostPosted: Wed Aug 03, 2022 1:42 am    Post subject: Reply with quote

Just a quick synopsis for posterity sake. Correct me if this is incorrect, but my sample code (modified) shows these interactions.

* If you do not specify %he, your menu help will be at the bottom of the window, and any controls with help will also.
* If you do specify %he/%sb, menus and any controls that have help associated will also show at that location.
*If you use %th, your controls will show help differently than will menu help.

These rules also apply for imbedded child windows and %ps. Namely, if you wish balloon style help, each child window must contain a %th. Otherwise, a default help line will be created at the bottom of the child window, and that's where the help will display. In the child window, you can use %he/%sb to place the help line wherever you wish.
Back to top
View user's profile Send private message Visit poster's website
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7376
Location: Salford, UK

PostPosted: Wed Aug 03, 2022 6:54 am    Post subject: Reply with quote

Almost.

In the first case...

* If you do not specify %he/%th/%`sb then ClearWin+ provides a %he for you at the bottom of the window where menu/control help appears.
Back to top
View user's profile Send private message AIM Address
wahorger



Joined: 13 Oct 2014
Posts: 1054
Location: Morrison, CO, USA

PostPosted: Wed Aug 03, 2022 2:01 pm    Post subject: Reply with quote

Thanks for the correction, Paul!
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group