Rounded corners for text field ? How to
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Rounded corners for text field ? How to
Hi,
I can t locate the Properties for rounding each corners of a Text field...or any other fld, list, DG.
Usualy you can check each corners and even define a radius, 5, 10... to define larger/smaller round corners.
anyone knows how to do that
tkx
something like that...
I can t locate the Properties for rounding each corners of a Text field...or any other fld, list, DG.
Usualy you can check each corners and even define a radius, 5, 10... to define larger/smaller round corners.
anyone knows how to do that
tkx
something like that...
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Rounded corners for text field ? How to
Hi,
As far I know, you can't have rounded corner for a fld
When I need something like that i use a group. One grc and one fld
Jean-Marc
As far I know, you can't have rounded corner for a fld
When I need something like that i use a group. One grc and one fld
Jean-Marc
https://alternatic.ch
Re: Rounded corners for text field ? How to
Ok, so the 2 last lines of the coding below are not possible (yet), right ?
Are you using group to indeed apply a grafic rectangle on top of an input field and rounding the rectangle corners to make it look like the underlying input fields have rounded corners ?
for I grouped fields but dont know if I can actualy apply rounded corners to the group that would actualy affect corners of all the input fields included within this group.
Code: Select all
on mouseup
## rounding grafic
set the roundRadius of graphic "Rectango" to 10
set the style of graphic "Rectango" to roundRect
## rounding text field
set the roundRadius of fld "Finput" to 10
set the style of fld "Finput" to roundRect
for I grouped fields but dont know if I can actualy apply rounded corners to the group that would actualy affect corners of all the input fields included within this group.
Last edited by teriibi on Mon Feb 12, 2018 9:47 pm, edited 1 time in total.
Re: Rounded corners for text field ? How to
I don't know about the last two lines of code, I've never tried em
As far as I know, you don't even have to group the controls, in this version of that timer (earlier prototype), the controls were just laid out on the card as you see in the project browser. Then I either made the field or graphic more or less transparent to get the effect I wanted.
I removed the title bar from the window, and used two buttons to move it around or close it. I didn't start grouping parts of it until I needed to move things around, since it is easier to move / position a group than individual components where one is above the other in the layers.
As far as I know, you don't even have to group the controls, in this version of that timer (earlier prototype), the controls were just laid out on the card as you see in the project browser. Then I either made the field or graphic more or less transparent to get the effect I wanted.
I removed the title bar from the window, and used two buttons to move it around or close it. I didn't start grouping parts of it until I needed to move things around, since it is easier to move / position a group than individual components where one is above the other in the layers.
Re: Rounded corners for text field ? How to
Fields in Livecode are ALWAYS rectangular, no rounded corners available, same for groups!
Put a graphic (rounded rect) BEHIND your field to get this effect.
Put a graphic (rounded rect) BEHIND your field to get this effect.
Re: Rounded corners for text field ? How to
Well, behind or on top, depending on the effect your trying to achieve
Don't forget to turn off the 'border' on the field.
*Edited to show examples -
Made into a quick 'custom window shape'
Last edited by bogs on Mon Feb 12, 2018 5:28 pm, edited 1 time in total.
Re: Rounded corners for text field ? How to
I presumed an EDITABLE field, cherie!
Re: Rounded corners for text field ? How to
Well, it depends on how fancy you want to get, although Klaus brings up a good point. If your field is 'behind' the graphic, and the graphic is set to opaque (like what I put in above), you will have to code so that the graphic doesn't block the field, but it can be done and isn't horribly difficult.
If the graphic is *not* opaque, and your only using the border to enclose the field, no issues.
If you want the graphic and *don't* want someone to edit the field behind it, that is even easier, by default as Klaus points out, opaque graphics are blocking what is behind them, no matter what blend level you set
As advice, I'd set the scrollbar in a scrolling field to 'small' to boot, the smaller it is, the closer to the edges of the radiused corners you can put it without it overlapping past them.
Re: Rounded corners for text field ? How to
Ahhhhhhhhhh !
Well, I m glad I ve learned this today.
(The doc is so substancial and with so litle samples one has to figure it all, I believe that many would d save a loooooooot of time with more examples on each functions.)
didnt think 2 values were mandatory indeed...
TKS !
Well, I m glad I ve learned this today.
(The doc is so substancial and with so litle samples one has to figure it all, I believe that many would d save a loooooooot of time with more examples on each functions.)
didnt think 2 values were mandatory indeed...
TKS !
Re: Rounded corners for text field ? How to
Erm, I *think* you meant the above reply for your other topic where Richard pointed out that your "loc" needed 2 coordinates
Re: Rounded corners for text field ? How to
Oopss, right, pulled a Topic , my bad !
-
- VIP Livecode Opensource Backer
- Posts: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Rounded corners for text field ? How to
Sounds like you've been reading the Dictionary. Which is a great resource for quick reference on specific language elements, but to get a sense of how they fit together check out the User Guide (accessed through the Help menu).
Pg 145 starts an introduction to scripting the user interface, which sounds like a good fit for where you are right now.
Worth at least a quick skim of the rest as well, so you'll know where you can learn more about specific topics as you need them later on.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn