Page 1 of 1
Field shape
Posted: Tue Aug 25, 2009 12:48 pm
by trevix
Does anybody knows if it is possible to change the shape of a text field ?
Like having a rounded corner text field ?
Trevix
Posted: Tue Aug 25, 2009 1:01 pm
by Klaus
Buongiorno Roberto,
no, this is not possible!
But you could "fake" this with a borderless field and a graphic (or image) with rounded corners behind it?
You get the picture
Best
Klaus
Posted: Tue Aug 25, 2009 4:32 pm
by trevix
mmmh...no.
I use the text flds to show events in a calendar. The rounded corner where needed to show the start and end of the event (a la iCal).
It would be too complex to keep together the graphic and the field, I think (many fields, resizable...).
Any other way you can think of ?
Posted: Tue Aug 25, 2009 5:17 pm
by Klaus
Hi Roberto,
no sorry, only more or less complex solutions, like a group consisting of two fields and a graphic.
Best
Klaus
Posted: Tue Aug 25, 2009 7:07 pm
by SparkOut
Other than that (and I'm not sure if this is a sensible suggestion) would it help to put a bracket type graphic as the imageSource of the first and last characters in the field?
Posted: Tue Aug 25, 2009 10:56 pm
by trevix
I'm already using the imagesource for different reasons...
I noticed that I can show the name of a rounded rectangle. But it shows in the middle vertical of it and no multiple lines.
Do you think is possible to alter the resource of Rev so as to have more positionable text on it ?
Posted: Tue Aug 25, 2009 11:17 pm
by bn
trevix,
you can set the label of a graphic, if the show name of the graphic is true then you will see the label instead of the name.
Code: Select all
on mouseUp
set the label of graphic 1 to "this is the first line" & cr & "this is the second line" & cr & "and another one"
end mouseUp
but I think a group of field without border and a rounded graphic are more suitable.
regards
Bernd
Posted: Tue Aug 25, 2009 11:35 pm
by SparkOut
You can also play about with the text formatting on the graphic, to set left/centre/right alignment, etc - but also in particular you can set the margins.
By default you get one value in the margin box, which will be used for the same margin all the way round. You can set individual left, top, right and bottom margins (in that order) as in 8,8,20,40 which will give a margin of 8 left and top, 20 on the right and 40 at the bottom. If you know your field height will stay the same you can fiddle with the margin to push the text up inside the graphic with a higher bottom margin (say).
You wouldn't be able to have the text autowrap as the field changed width though. You would definitely be better off (IMHO) with a rounded rectangle set to opaque with the background colour set to the same as your field, and a slightly smaller field inside it. If you set them to resize in the same way, they should move and expand together to keep the look consistent. I can't think of a better way to handle it anyway.