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/

Reply via email to