"Rob Graber" <[EMAIL PROTECTED]> wrote in message
news:18292@palm-dev-forum...
>
> I have a form designed in Codewarrior's Constructor with a HelpID and a
Help
> String. It therefore shows the little "info" icon in the upper right part
> of the form.
>
> I want to have multiple help strings that popup based on certain
conditions
> in the form. How can I dynamically control which help string pops up? I
> have found the FrmHelp API call, but how do I know what event occurs when
> the user taps the "info" icon so that I can trap that event and handle it
> with conditional FrmHelp calls?
I just traced this using the event logging feature of the Palm OS Emulator
to see if there were any events thrown when the "i" is selected. It appears
not -- the modal dialog handler is detecting the tap on the "i" using a
penDown event, then tracking the pen using EvtGenPen until its released. If
it is released inside the "i", it then directly calls FrmHelp.
You may be able to get away with changing the form's helpRscId field based
on what has happened in the form. That isn't guaranteed to work in future
OS versions, however. To do that, you'd need to add your own event handler
into the modal form with something like
frm = FrmInitForm(...);
FrmSetEventHandled(frm, ...);
FrmDoDialog(frm);
Your event handler will be called before the system's modal dialog
handler -- you do need to be careful not to return true from it for events
that the modal handler would be looking for unless you want to prevent the
modal handler from doing its job. I use this technique in an application to
close a dialog when an item from a long list is selected.
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/