Page 1 of 1

Another Suggestion

PostPosted: Thu Jun 04, 2015 4:26 pm
by Markus
Hi Ray,
since I know you want to hear from your customers what they need, here is another suggestion:
A TText component that would behave analogous to the radiant shapes. What I mean is, that text size would scale similarily like the border in the radiant shapes. With the given FMX TText this is not achievable. Putting a TText in a TScaledLayout is not a good solution as it distorts the font if the aspect ratio changes from that at design time.

Markus

Re: Another Suggestion

PostPosted: Fri Jun 05, 2015 2:02 am
by Raize Support
Agreed. This is definitely something we would like to do. Thought about it for first release but did not have time.

Ray

Re: Another Suggestion

PostPosted: Fri Jun 05, 2015 2:25 am
by Markus
Hi Ray,

after having spend the night working on that problem I think I came up with a solution, albeit a bit cumbersome, so having a ready made component would definitely help. Here is my solution, in case you are curious:
1) I place a TLayout into a container, e.g. a TRadiantRectangle.
2) I position the TLayout where I want my text to appear, by e.g. using different align settings
3) Then, and this is important I have to set the align of the TLayout to scale
4) Then I add a TScaledLayout to the Layout
5) I set TScaledLayout.align to client to fill the parent TLayout
6) I set TScaledLayout.align to fit - this does the trick actually, so that the text gets not distorted
7) I place a TText into the TScaledLayout and set its align to client - done

As I said, a bit cumbersome, but at least a workable solution.

Markus