Round Buttons?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Livecode Opensource Backer
- Posts: 10095
- Joined: Fri Feb 19, 2010 10:17 am
Round Buttons?
Is there a relatively simple way (i.e. inwith LiveCode) to make new controls such as round buttons?
-
-
-
- Livecode Opensource Backer
- Posts: 10095
- Joined: Fri Feb 19, 2010 10:17 am
Re: Round Buttons?
Who made the decision that a button cannot have the property roundRadius?
Re: Round Buttons?
You could use the free "Universal button" widget from Ralf Bitter.
https://github.com/revig/universal-butt ... t/releases
Set the corneradius to 90° and there you go...
https://github.com/revig/universal-butt ... t/releases
Set the corneradius to 90° and there you go...

-
- Livecode Opensource Backer
- Posts: 10095
- Joined: Fri Feb 19, 2010 10:17 am
Re: Round Buttons?
Thank you, Klaus: I'll give that a try, even if it doesn't answer my question. 
viewtopic.php?t=26983

viewtopic.php?t=26983
Last edited by richmond62 on Fri Sep 13, 2024 2:12 pm, edited 1 time in total.
Re: Round Buttons?
OK, the answer is NO. 
Doing so within LC will require scripting and probably even a group of controls

Doing so within LC will require scripting and probably even a group of controls
-
- Livecode Opensource Backer
- Posts: 10095
- Joined: Fri Feb 19, 2010 10:17 am
Re: Round Buttons?
I have done this about 15 times in the last 22 years! Just wondering if there was not a more permanent solution.Doing so within LC will require scripting and probably even a group of controls
Re: Round Buttons?
Richmond.
Buttons in LC are a predefined object class; their several fixed variants each do their own thing. In other words, are you looking for some new native functionality? If so, you need to roll your own.
So for someone as prolific as you at using images, apart from the "look" of a button (which should be easy) what do you want to do?
Craig
Buttons in LC are a predefined object class; their several fixed variants each do their own thing. In other words, are you looking for some new native functionality? If so, you need to roll your own.
So for someone as prolific as you at using images, apart from the "look" of a button (which should be easy) what do you want to do?
Craig
-
- Livecode Opensource Backer
- Posts: 10095
- Joined: Fri Feb 19, 2010 10:17 am
Re: Round Buttons?
A button that is round.So for someone as prolific as you at using images
As per my earlier mockup.
Re: Round Buttons?
I see, a button that is round.A button that is round.
As per my earlier mockup
There isn't one, of course. Have you tried setting the icon of a button that is stripped of most of its visible properties? At least that is actually a native button, and if you can find a plain, empty circular icon you are done.
But why not just use a circle graphic or circular image that acts just like a button? I know you can make such a thing, and unless the widget that Klaus mentioned has some way to set its shape, I do not see much of an issue overall.
Craig
Re: Round Buttons?
Richmond wrote:
So the issue is not how to make a round button, but to make new object classes, or at least add variants to existing ones? In other words, forget about combo boxes, rather, make an exploding button. That means modifying the engine, no?
Craig
Aha. To "make new controls"...to make new controls such as round buttons?
So the issue is not how to make a round button, but to make new object classes, or at least add variants to existing ones? In other words, forget about combo boxes, rather, make an exploding button. That means modifying the engine, no?
Craig
Re: Round Buttons?
The 3 ways you can add a new control are with an LCB widget (requires learning LCB), a Script Widget (standard LCS but with a lot of extra work needed) or with a group. The group is the easier approach but not easy to have a property inspector, can't by default add to toolbar, etc. But it's very much something that would look and behave like a button or other control and can potentially lend itself to being converted to a script widget.
But to do this right, no matter which approach is chosen, a *lot* of work is needed for relatively little gain, whereas Ralph's Universal Button does it all and, it looks, behaves and smells like a button. So seems like a no-brainer. Unless of course the real question is not about a round button at all, but a general approach about how to make 'new controls', in which case I'd revert to one of the above.
But to do this right, no matter which approach is chosen, a *lot* of work is needed for relatively little gain, whereas Ralph's Universal Button does it all and, it looks, behaves and smells like a button. So seems like a no-brainer. Unless of course the real question is not about a round button at all, but a general approach about how to make 'new controls', in which case I'd revert to one of the above.
-
- Livecode Opensource Backer
- Posts: 10095
- Joined: Fri Feb 19, 2010 10:17 am
Re: Round Buttons?
Is that a fact?There isn't one, of course.
- - -
Admittedly the text is in a crappy position . . .
Re: Round Buttons?
Since beyond a round button you are seeing to align an icon and text as well:
https://github.com/revig/universal-button-widget
or roll your own as a group or script widget, or stick with a subpar solution. No one minds.
Re: Round Buttons?
Richmond.
Setting the style of button to oval is not the same as having a round button. Such a button still has a standard rect property, and the areas within the four corners that "surround" the round-looking part respond to mouse clicks. A truly round button would not.
And a property as, say, the "topLeft" is at the usual corner, not at the 135° point on the visible circle. They are still "rectangular" buttons.
Unless I misunderstood you earlier, you wanted a round button, not a round-looking button.
Craig
I think so.Is that a fact?
Setting the style of button to oval is not the same as having a round button. Such a button still has a standard rect property, and the areas within the four corners that "surround" the round-looking part respond to mouse clicks. A truly round button would not.
And a property as, say, the "topLeft" is at the usual corner, not at the 135° point on the visible circle. They are still "rectangular" buttons.
Unless I misunderstood you earlier, you wanted a round button, not a round-looking button.

Craig
Re: Round Buttons?
I'm not sure I understand your argument there Craig - a "topLeft" cannot exist for a circle without a square rect...dunbarx wrote: ↑Sat Sep 14, 2024 9:17 pmSetting the style of button to oval is not the same as having a round button. Such a button still has a standard rect property, and the areas within the four corners that "surround" the round-looking part respond to mouse clicks. A truly round button would not.
And a property as, say, the "topLeft" is at the usual corner, not at the 135° point on the visible circle. They are still "rectangular" buttons.
In fact in any environment I've ever used (which is not that many, admittedly but is more than a handful), all circular structures are considered ovals with same width/height and utilise a square rect. I've never seen a "truly round button" that doesn't behave like that, so not sure that's a true argument

Or are u just funning Richmond
