I also ran into this problem.  It took a little digging, but I finally got
it to work.  Perhaps someone at Palm could explain the behavior of the
Bitmap ID property of the Graphic PushButton item?  I thought it would
handle the bitmap drawing for us.  Inside Constructor, the bitmap appears,
but not at runtime.  Is this a bug?  I am using the latest 3.5 SDK on NT4
workstation.

I found that if you call CtlSetGraphics the bitmap is properly drawn.

Kirk


The following code is from a bogus project I created to test this issue:

static Boolean MainFormHandleEvent(EventPtr eventP)
{
   Boolean handled = false;
   FormPtr frmP;

 switch (eventP->eType)
  {
  case menuEvent:
   return MainFormDoCommand(eventP->data.menu.itemID);

  case frmOpenEvent:
   frmP = FrmGetActiveForm();
   MainFormInit( frmP);

   CtlSetGraphics(GetObjectPtr(MainCmd1PushButton),untitledBitmap4,NULL);
   CtlSetGraphics(GetObjectPtr(MainCmd2PushButton),untitledBitmap3,NULL);
   CtlSetGraphics(GetObjectPtr(MainCmd3PushButton),untitledBitmap2,NULL);
   CtlSetGraphics(GetObjectPtr(MainCmd4PushButton),untitledBitmap,NULL);
   FrmDrawForm ( frmP);

   handled = true;
   break;

  default:
   break;

  }

 return handled;
}


Stephen Bentley <[EMAIL PROTECTED]> wrote in message
news:9899@palm-dev-forum...
>
> I am using a Palm IIIc running Palm OS 3.5 and developing with the
> 3.5 SDK.  Has anyone successfully done this?
>
> > This is my first attempt of using a graphic button.
> >
> > I don't understand why the button is blank until tapped THEN
> > I see the bitmap I defined for it.  Once it responds to the tap,
> > it goes blank again.
> >
>  > What am I doing wrong?
> >
>  > Steve
> >
>
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to