Hello folks, In my application, I need to display a somewhat complex dialog to the user, asking him for some information. The dialog contains two labels, two fields, a checkbox and three buttons. The contents of the fields is supposed to be filled at runtime and is for informing the user. The user's response is entered via tapping one of the three buttons - and the checkbox can be optionally checked.
I thought that the best way to do this is via FrmDoDialog. I have implemented the dialog described above as a modal form. From my code I do FrmInitForm() to load and initialize the form, then FrmSetEventHandler() to set an event handler for the form, then FrmDoDialog() to display the form and get the user's response. Finally, I use FrmGetControlValue() to check whether the checkbox was checked by the user and then FrmDeleteForm() to dispose of the form. It all sort of works - with one exception. Namely, the two fields are blank. I try to fill them from within the event handler for the form - at frmOpenEvent. But that code never receives control! I tried doing it on frmLoadEvent - but that event doesn't seem to be broadcast to forms opened with FrmDoDialog, either. Some digging in the documentation confirmed that frmOpenEvent is not broadcast when a form is opened via FrmDoDialog: http://www.palmos.com/dev/support/docs/protein_books/User_Interface/UI_FormConcept.html#1010353 The documentation says: "You do not receive frmLoadEvent or frmOpenEvent if you call FrmDoDialog(). Perform any necessary initialization, including calling FrmInitForm() and setting the form's event handler, before you call that function. FrmDoDialog() calls FrmSetActiveForm() for you." Well, then, I tried displaying the contents of these two fields after calling FrmInitForm and before calling FrmDoDialog - but that didn't work, either. Before FrmDoDialog is called, the form isn't drawn yet - so I am not writing on the form but on the screen beneath it. :-( Any ideas how to do it? I'd rather not use FrmPopupForm or FrmGotoForm - this will make the things rather complicated. Regards, Vesselin -- For information on using the PalmSource Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
