Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.

Welcome, Guest
Guest Settings

Thread: How to set TButton VertTextAlign at run time and with the Object Inspector

Permlink Replies: 0
Chris Woodhouse

Posts: 5
Registered: 2/9/00
How to set TButton VertTextAlign at run time and with the Object Inspector
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 8, 2017 5:01 PM
I was trying to set the VertTextAlign property for a button but I can't find it in the Object Inspector. I have set the object inspector to view all properties but it still isn't there, not even under the TextSettings Section.

So I decided to try setting it at run time with..

Button1->TextSettings->VertAlign =

But = to what is the question. I eventually figured out I can set to an int value of 0, 1, or 2 but I'm sure that isn't the way it is intended to work. In the documentation i find this;

__property Fmx::Types::TTextAlign VertTextAlign = {read=GetVertTextAlign, write=SetVertTextAlign, default=0};

But I can't figure out how to call the SetVertTextAlign method. I also figured out that there is an enum declared like this;
enum class DECLSPEC_DENUM TTextAlign : unsigned int { Center, Leading, Trailing, taCenter _DEPRECATED_ATTRIBUTE3("Use TTextAlign.Center") = 0x0, taLeading _DEPRECATED_ATTRIBUTE3("Use TTextAlign.Leading") = 0x1, taTrailing _DEPRECATED_ATTRIBUTE3("Use TTextAlign.Trailing") = 0x2 };

but I can't figure out what syntax I need to use so I can use the Center, Leading or Trailing key words to set the property in my code.

I haven't used the C++ builder dev tools in quite some time, so I'm still trying to get familiar with the syntax again.

Coming back from several years of mostly doing PHP development is taking some time to get going.

Thanks for the help

Chris W
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02