?
Solved

Button without a frame

Posted on 2002-07-22
9
Medium Priority
?
212 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
9 Comments
 
LVL 4

Expert Comment

by:offir_a
ID: 7169574
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
ID: 7169649
No, I create the button dynamically using CtlNewControl() API
0
 
LVL 4

Accepted Solution

by:
offir_a earned 600 total points
ID: 7170676
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
Want to be a Web Developer? Get Certified Today!

Enroll in the Certified Web Development Professional course package to learn HTML, Javascript, and PHP. Build a solid foundation to work toward your dream job!

 
LVL 2

Expert Comment

by:waseemanis
ID: 7202473
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
ID: 7202725
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
ID: 7202906
Well .. from what it seems.. this is one chance you'd have to take...I would !!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month14 days, 20 hours left to enroll

770 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