Some additional information for my own post:

it seems that this is linked to the main form's focus attribute.

Initially, no object on the main form has the focus, and touching the main 
form means that one of its objects get the focus (the table object when I 
tap on it).

It seems that FrmDoDialog() is looking at the focus attribute of the 
underlying form when it decides about the fate of the cursor?

If I add "FrmSetFocus(prevForm, noFocus);" at the top of my PrefDialog() 
function, the problem goes away, but I don't understand why...

     Gert-Jan

At 14:42 08/12/2001, I wrote:

>I'm having a problem with a dialog, the insertion point continues to blink 
>on the screen even when the dialog has been removed.
>
>This has been discussed a couple of times before in this forum, but even 
>if I do as suggested in the older threads, it still fails sometimes.
>
>If I start my app, draw the main form, and then put this dialog on top 
>(happens when a user selects a menu entry), it works fine, no traces of 
>the cursor remain after quitting the dialog.
>
>I can repeat that as long as I want, the cursor always goes away when the 
>dialog is removed.
>
>
>_However_, if I first change something on my main form (scroll a table, 
>update a text field, ...), the cursor continues blinking on my main form 
>once I quit the dialog.
>
>Fully redrawing the main form doesn't make it disappear, the blinking 
>cursor only goes away when another dialog is displayed & removed.
>
>What kind of link can there be between my main form and this dialog?
>
>
>Here's what I do:
>
>PrefsDialog()
>{
>     ...
>
>     prevForm = FrmGetActiveForm();
>     frm = FrmInitForm(PrefsForm);
>     FrmSetActiveForm(frm);
>
>     ... put data in fields, set control values ...
>
>     /* need own event handler to process the gadgets */
>     FrmSetEventHandler(frm, MyHandleEvent);
>
>     FrmDrawForm(frm);
>
>     ... draw gadgets ...
>
>     /* Set focus. Must be done _after_ the form is displayed! */
>     FrmSetFocus(frm, FrmGetObjectIndex(frm,
>                          PrefsRemindNumDaysField));
>
>     button = FrmDoDialog(frm);
>
>     ...
>
>     FrmEraseForm(frm);
>
>     FrmDeleteForm(frm);
>
>     if (prevForm)
>         FrmSetActiveForm(prevForm);
>
>     ...
>}
>
>Removing the event handler or adding a FrmDrawForm before I initialise the 
>fields and controls, it doesn't change anything.
>
>Any ideas?
>
>     Gert-Jan
>
>
>
>--
>For information on using the Palm Developer Forums, or to unsubscribe, 
>please see http://www.palmos.com/dev/tech/support/forums/


-- 
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