custom button in custom form not working...how to to get event handler for the 
button on custom form?

Boolean handled = false;
ControlPtr yesB,noB;
EventPtr event;
FormPtr form;
FieldPtr field;
    
form = FrmNewForm(8000, "PC Expert", 0, 0, 160, 160, false, 0, 0, 0);
            
field = FldNewField((void**)&form, 8001, 3, 16, 154,88, stdFont, 500, false, 
false, false, true,leftAlign, false, true, false);  
    
yesB = CtlNewControl((void**)&form, 8002, buttonCtl, "Yes", 26, 114, 37,12, 
stdFont, 0, true );
    
noB = CtlNewControl((void**)&form, 8003, buttonCtl, "No", 94, 114, 37,12, 
stdFont, 0, true );
    
FrmDrawForm(form);
FldDrawField(field);
CtlDrawControl(yesB);
CtlDrawControl(noB);
    
FrmSetActiveForm(form);
    
setFieldText(8001," /*some text print out here*/  ");
    
if( event->eType == ctlSelectEvent )
{
   FrmGetActiveForm();
   if(event->data.ctlSelect.controlID == 8002)
   {
     setFieldText(8001,"/*replace previous text with this one*/");
   }
}
return (handled);
-- 
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to