Page 1 of 1

PostPosted: Fri Jan 12, 2007 9:45 pm
by johncraw
It seems every time I try to do something with bitmaps, I learn someting that I am not doing right.
I am trying to add some bitmaps to buttons on a form. The buttons are 40X20, and one of them is named btnG1.
The bitmaps are also 40X20, however I have tried various sizes.
The following code should (I think do what I need, however when I run it, nothing happens. No errors, it just does not show the bitmaps.
The code is in the mainform.oc
G1nor = 7000,

Bitmap bitmap;

//Bitmaps for the button icons

@bitmap Bitmap bmppict1 {id = G1nor image16="G1nor.bmp"}
@bitmap Bitmap bmppict2 {id = G1sel image16="G1sel.bmp"}

handler mainForm.onopen()
alert("OS version = [" + osvers() + "]");
btnG1.bmpid = G1nor;

btnG1.sbmpid = G1sel;


The emulator version is 4.1 and the pda version is 5+. I read that for the bitmaps to work in this way the version must be 3.5 or graeter.
Any direction, help or un screwing me up would be appreciated.
Thanks in advance
John Crawford

PostPosted: Sat Jan 13, 2007 12:19 am
by dewey
The buttom must be declared with the graphic field set to true in order for this to work. If you are using OrbForms Designer, select the appropriate checkbox. If you are using PocketC Architect, make sure your declaration contains "graphic = true"

PostPosted: Sat Jan 13, 2007 10:56 am
by johncraw
It's amazing how I looked and looked, and did not see the property. Now it works as needed. thanks.