1. Try checking the extended bit of your gadget. The code would look
something like this:
-------------------------
FormGadgetType *pGadget;

pForm = FrmGetActiveForm();
pGadget =
(FormGadgetType*)FrmGetObjectPtr(pForm,FrmGetObjectIndex(pForm,GADGET_RESOURCE_ID));
if(pGadget->attr.extended == 1) {
..
Show an alert telling you that the gadget is an extended gadget
..
} 
-------------------------
It's dirty code. Don't use it in the final app.

If your alert doesn't show your gadget isn't an extended gadget and thus
a gadgethandler 
set by FrmSetGadgetHandler will never be called. My guess is that this
is why you don't see anything 
different. I don't know how to create an extended gadget properly. I
just asked that queston myself ;)

3. The meaning of the messages in the cases can be found in the Palm OS
SDK reference (for 3.5) pdf file. They are explained on pages 299 and
300 in Application-Defined Functions - FormGadgetHandler.


There are some typos in the palmOS 3.5 gadget example;
frmGadgetDrawCmd should be formGadgetDrawCmd
and
fldGadgetEnterEvent should be frmGadgetEnterEvent

Gerald


Oscar wrote:
> 
> Dear all,
> I have some problems onn gadget UI,
> 
> 1. I have created a new gadget by FrmNewGadget(), and  set the gadget event
> handler already, but I can't see anything different on the form. What should
> I do?
> 2. If I want to capture the ctlSelectevent if user tap on the gadget object?
> What should I do? May I set someting in the gadget event handler?
> 3. I have read the Palm OS companion gadget example, there is a switch case
> in the gadget handler, what does that cases mean?
> 
> thanks a lot,
> Oscar
> 
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
>http://www.palmos.com/dev/tech/support/forums/


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