Re: "Help" in Widget Programs [message #2331 is a reply to message #2321] |
Wed, 08 June 1994 14:40   |
landers
Messages: 45 Registered: May 1993
|
Member |
|
|
Daniel M. Israel (crdmi@vulcan.giss.nasa.gov) wrote:
|>
|> Has anyone written any widget programs with context sensitive pop-up
|> help? I would like to do this, but I can't think of any method that is
|> not extremely clumsy. Any suggestions?
I haven't done this, and I am not familiar with IDL widgets (just WAVE)...
But it seems that you could create a 'help' button whose callback would:
- set a global (common block) 'do_help' flag
- maybe change the cursor to a ? (if you could reasonably do that
'recursively' through all your widgets)
Then write a widget_help() function that would check the do_help flag, and
pop up the help text, and reset the flag.
It would return the flag (0 if not helping, 1 if helping), so each of your
callbacks would do:
pro callback_whatever, etc
if widget_help( 'help_file_for_this_widget.txt' ) then return
;... regular callback stuff....
end
This may not pass the 'clumsy test', but seems a reasonable starting point.
It only adds one line of code to the callback programs, but you may need to
create callbacks for widgets that wouldn't normally do anything (like display
widgets or whatever).
Just what came to mind.....
;Dave
|
|
|