Solved

Button without a frame

Posted on 2002-07-22
9
206 Views
Last Modified: 2013-12-27
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
0
Comment
Question by:tulin
  • 2
  • 2
  • 2
9 Comments
 
LVL 4

Expert Comment

by:offir_a
Comment Utility
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.
0
 
LVL 1

Author Comment

by:tulin
Comment Utility
No, I create the button dynamically using CtlNewControl() API
0
 
LVL 4

Accepted Solution

by:
offir_a earned 150 total points
Comment Utility
Hi,

I've checked the reference for it, and then checked the web as well... this seems like a strange bug in PalmOS!
They write in the reference "The ButtonFrameType specifies the type of box.", but they don't write how to send it into CtlNewControl() !!!

Another guy asked for the same thing in another group several months ago, and got the same "HUH!?" answer...

Well, in this case, if you don't want to waste time, I would go on the easy solution: Create as many buttons as you'll need dynamically - as static buttons on the form, but all are hidden, and only show those you need at run time. a lame solution, but should work...
Another way to bypass it is to create your own button as a gadget, or just to catch the pen down events and check if it's in the place you should have a button...

Sorry... :) Hope this helps in any way!
Offir.
0
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 2

Expert Comment

by:waseemanis
Comment Utility
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.
0
 
LVL 1

Author Comment

by:tulin
Comment Utility
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.
0
 
LVL 2

Expert Comment

by:waseemanis
Comment Utility
Well .. from what it seems.. this is one chance you'd have to take...I would !!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

With Windows Embedded Handheld, called Windows Mobile, Microsoft re-designed the user interface. The Start Icon moved down to the bottom, inside the menu bar area.   If you need to hide the Start Icon and/or the SIP (soft input panel, softwar…
Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator (https://www.appcelerator.com/). This article presumes a wor…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now