I think I found this in one of the white papers. I had the same kind of problem, and it has proven to be a good solution. Use the winExit and winEnter events to detect if you have exited from the current window. If so, stop drawing.

case winExitEvent: if (eptr->data.winExit.exitWindow == (WinHandle) FrmGetFormPtr(parentForm)) {
menuIsOpen=true; // stop drawing.
}
break;
case winEnterEvent:
if (eptr->data.winExit.enterWindow == (WinHandle) FrmGetFormPtr(parentForm)
&& eptr->data.winExit.enterWindow == (WinHandle) FrmGetFirstForm()) {
menuIsOpen=false; // start drawing.
}
break;


Bob.


Luc Le Blanc wrote:


Matt Graham a �crit :



Jim White wrote:


I have noted that when I bring up a menu over some fields that are
being re-written at regular intervals, the data in the field
over-writes the menu.

I have tried triggering on various things (like MenuOpenEvent to hide
the fields and MenuEvent to re-enable them) but I can't seem to get
consistency in the events (I get 3 MenuOpenEvents, followed by a
winExitEvent, followed by two MenuOpenEvents when I open the menu,
for example).

Is there a clean and easy way to stop displayed fields, buttons, etc.
from overwriting an open menu?


You could try hiding the offending fields when the menu opens and
showing them again when it closes.



How do you know the menu closes? The API Reference states the menuCloseEvent is not implemented :(


-- Luc Le Blanc








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

Reply via email to