After I turned a modal form into non-modal, I can no longer add buttons
in the Menu Command bar, which is now empty. The form has a single
field, and I want to add a 'i' bitmap for help. I do:

case menuCmdBarOpenEvent :

if ( ( field = FrmGlueGetActiveField( form ) ) != NULL )
    FldHandleEvent( field, event );

to get the field-related buttons in the command bar, then

text = ( Char * ) MemHandleLock( ( handle = DmGet1Resource( strRsc,
HelpString ) ) );
MenuCmdBarAddButton( menuCmdBarOnLeft, BarInfoBitmap,
menuCmdBarResultChar, symbolHelp, text );
MemHandleUnlock( handle );

to add an 'i' button with text 'Help' (the form only has an Edit menu so
I must provide a text), then

event->data.menuCmdBarOpen.preventFieldButtons = true;

to not get the field-related buttons twice. And I leave handled to
false.

Alas, the command bar only displays "/..."

If I don't handle the menuCmdBarOpenEvent at all, the command bar
contains the field-related buttons...


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