Hi Miro,

Thanks for that - I think the problem I had was in the same family as
what you pointed out. I discovered (quite accidentally), that it will
only correctly size/center all of the buttons on the form when *all* of
the buttons that exist on the form have had their SELECTEDBITMAP (and/or
the button bitmaps as the correct size in the BMP file). I had a couple
of unimplemented buttons at the bottom that I worked on while waiting
for an answer and once those were done my initial trouble button
(thisButton) immediately works as desired.

Thanks,
Stefan

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Miro Pomsar
Sent: Friday, June 23, 2006 12:16 AM
To: Palm Developer Forum
Subject: RE: Buttons in resource file

Hi,

        if "thisButton" is a bitmap family ( "BITMAPFAMILYEX" ), then
PalmOS relies on the dimensions of the LOW DENSITY member. So you
have to make sure your HIGH DENSITY bitmap in family is always 
2x the LOW DENSITY bitmap.

Regards,
        Miro Pomsar


 

>-----Original Message-----
>From: [EMAIL PROTECTED] 
>[mailto:[EMAIL PROTECTED] On Behalf Of Stefan Mohr
>Sent: Thursday, June 22, 2006 20:49
>To: Palm Developer Forum
>Subject: Buttons in resource file
>
>Hi all, got a probably simple but (to me) unintuitive problem 
>with graphical buttons..
>
> 
>
>I'm drawing buttons on a form which are specified in 
>resources.RCP. At one point the original author was using 
>PilRC but stopped because of some annoyances and instead coded 
>it all by hand - I'm now no longer able to open the resource 
>file in PilRC so I'm stuck coding by hand in CodeWarrior.
>
> 
>
>I declare a button like this:
>
>BUTTON "" ID myButton AT ( 1 1 32 32 ) NONUSABLE NOFRAME 
>BITMAPID thisButton SELECTEDBITMAPID thisButtonInverted GRAPHICAL
>
> 
>
> 
>
>The devices and sims I'm using are all hi-res colour, so the 
>64x64 pixel bitmaps are being scaled to 32x32... That much is fine.
>
>My problem is that the image isn't being centered - it 
>actually begins several pixels to the right and below the 
>(0,0) coordinate I expect it at. Since I specify the area is 
>32x32 pixels, it means the bottom right sector of the image is 
>getting cropped.
>
> 
>
>I can increase the size to something like 50x50 and it all 
>shows up, but then I'm wasting lots of space that I'd like to 
>use for something else.
>
> 
>
>I did notice that when I removed "SELECTEDBITMAP" from the 
>declaration, when I tap (and hold) the button, it draws a 
>highlighted border around the button which fills all of the 
>"wasted" area - I suspect even with an inverted version of the 
>bitmap it is still insisting on using the surrounding area.
>
> 
>
>Any GUI wizards have any thoughts?
>
> 
>
>Thanks,
>
>Stefan
>
>
>--
>For information on using the PalmSource Developer Forums, or 
>to unsubscribe, please see http://www.palmos.com/dev/support/forums/ 
>


-- 
For information on using the PalmSource Developer Forums, or to
unsubscribe, please see http://www.palmos.com/dev/support/forums/



-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to