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
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
ASKER
No, I create the button dynamically using CtlNewControl() API
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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.
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 !!
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.