Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Button without a frame

Posted on 2002-07-22
9
Medium Priority
?
214 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
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

 
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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

This article shows how to setup the internet connectivity on Windows Mobile Emulator.   I assume that you already have Microsoft Visual Studio, Microsoft Windows Mobile SDK's and the emulator installed. The emulator is available with Visual Studi…
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…
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…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

636 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