Link to home
Start Free TrialLog in
Avatar of tulin
tulin

asked on

Button without a frame

Hello,

how can I create button without a frame, or set appropriate style to it? I found ButtonFrameType enum, that is set of values for 'frame' field of the ControlAttrType structure, but there is no API to set the style !!

Any help / advise ?

thank you,

Alexey
Avatar of offir_a
offir_a

Hi Alexey,
Are you using the Constructor to create your forms?
If so, open a form with a button on it. Click the button and on the layout properties you'll see the checkbox named "Frame". Clear it - and you'll have a frameless button.

Hope this helps,
Offir.
Avatar of tulin

ASKER

No, I create the button dynamically using CtlNewControl() API
ASKER CERTIFIED SOLUTION
Avatar of offir_a
offir_a

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I use the following code to do that:


ControlPtr ctl = CtlNewControl( (void**)&frmP, 2002, buttonCtl , "Test", 10, 25, 36,12, stdFont, 0, true );

ctl -> attr.frame = noButtonFrame;

CtlDrawControl(ctl);



Hope this works for you.
Waseem.
Avatar of tulin

ASKER

I did so also, but there is a caution in the Palm documentation - not to access the structure directly, because in the future versions it may change. I asked how can I do this using API.
Well .. from what it seems.. this is one chance you'd have to take...I would !!