[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1288.0. "simple_text & help reason" by EIGER::MITEVSKI (A 'Special' day) Wed Aug 16 1989 13:50

    Hi !
    
    I got a problem to understand how one can force a help reason on
    a simple_text widget.
    
    What I want to do is to display information in a list_box, if the 
    user cries for help in a simple_text widget. Perhaps he doesn't
    know what can be put in this field, so I show all the possibilities
    in the list_box, where he can select one, which is then automatically
    transferred into the simple_text widget.
    
    If this isn't possible, what combination of widgets has to be taken
    instead.
                           
    
    Thanks in advance 
    
    Goran

T.RTitleUserPersonal
Name
DateLines
1288.1Example from DECtermHANNAH::MESSENGERBob MessengerWed Aug 16 1989 14:0322
Re:.0

In UIL you specify a help callback, e.g.

    callbacks
	{
	help = procedure cs_help_cb( menu_cs_help );
	};

Where "cs_help_cb" is a routine invoked for context sensitive help (i.e. when
the user holds down the Help key and clicks MB1), and menu_cs_help is a
parameter passed to that routine; in this case the parameter was declared
earlier in the UIL file:

value
  menu_cs_help			: compound_string( 'Menu_Bar' );

If you're using the low level widget interface, set the helpCallback resource
to your help callback routine.

				-- Bob

1288.2not yet solvedEIGER::MITEVSKIA 'Special' dayThu Aug 17 1989 04:3221
    Thanks Bob
    
    I still can't get the 'HelpButton down and click MB1' thing to work.
    There is no reaction to this combination. What I do is:
    
    object
      field_3 : simple_text { 
        ...
        ...
        callbacks { help = procedure set_list_box_values(k_field_1);
                  };
    };
    
    In set_list_box_values I, depending on the tag, display items in
    a list_box (DwtListBoxAddItems).
    
    
    Where am I going wrong ... (or are there special Helpbuttons) ?
    
    Goran

1288.3a suggestion4GL::SCAERThu Aug 17 1989 13:396
	If there are a limited number of choices to be entered in the
	simple text widget you could replace it with an option menu.
	That would keep the user from having to guess at the choices
	or ask for help.

1288.4Hmm... Maybe you should post the callback routineHANNAH::MESSENGERBob MessengerThu Aug 17 1989 17:347
Re: .2

Your UIL code looks OK.  When you press the Help key and ckick MB1, does the
help callback get called at all (a breakpoint or printf would be helpful)?

				-- Bob

1288.5if I only ...EIGER::MITEVSKIA 'Special' dayFri Aug 18 1989 10:1418
    I'm so sorry
    
    it DOES work, (if you do it right). The callback routine didn't
    get invoked at all. Well I got into this field by TAB so the
    simple_text widget got focus, then I pressed the help key and clicked
    MB1 and nothing happened.
    
    Shame on me ... I didn't realize that my mouse pointer was somewhere
    out there in the wild world of the screen and did not point to my
    simple_text widget.
    
    
    Thanks for all your help on help
    
    
    Goran_who_would_prefer_focus_to_point_in_such_cases_to_the_widget