> I am dynamically creating a form and some controls on it. I am
> setting event handling for all the controls. On ctlSelectControl() I
> nned to get the control which has been selected and then fire
> appropriate event.
>
> To do this, I use FrmGetFocus(form) to get the index of the object
> selected. Everytime I call this function it return noFocus. What
> could be the problem?
>
> If FrmGetFocus() doesn't work can you tell me of any alternate
> solution? I need help very desparately...
>
> Any suggestion is welcomed...

You do realize that only fields can have focus, right?  If a form has no
fields,
nothing will ever have focus.  Even if it has fields, if the focus has never
been
set, nothing will have focus.

A better bet for your ctlSelectControl function would be to get the
appropriate information from the actual event you receive.  The ID of the
control is in the controlID field of the event structure -- from that, you
can get its index in the active form and then use that to get info on the
actual control.



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to