Watch, Follow, &
Connect with Us

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

Welcome, Guest
Guest Settings

Thread: TButton behavior with '!' exclamation mark in the ->Caption property HUH?

Permlink Replies: 0 Threads: [ Previous | Next ]
Matthew Grayson

Posts: 8
Registered: 12/26/02
TButton behavior with '!' exclamation mark in the ->Caption property HUH?
Click to report abuse...   Click to reply to this thread Reply
  Posted: Mar 15, 2018 3:32 AM
Greetings all, I hope this post finds you well.

For compiler: C++ Builder 10.2 Version 25.0.29039.2004 / AKA: Tokyo 10.2.2 / target platform win32

In the midst of goofing around I added an exclamation mark at the end of the ->Caption property for a TButton.

In the object inspector it looks like [ this is a test! ] where the brackets are the text area. But Button1 (in this case) on the form designer looks like { !this is a test } - it places the exclamation mark at the beginning. Does my compiler think I'm in Spanish mode?

In fact, it does that for all chars !@#$%^&*()_+ Showing them in reverse on Button1 on the form designer as: +_)(*&^%$#@!

BUT BUT BUT - if I put this [ !this is a test ] in the caption box in the object inspector then the output displayed on Button1 on the form designer is { this is a test! }

So If I place one of the characters at the START of the ->Caption they will all display on the form designer at the END of text, and vise-versa if

I place them at the end they will show up at the start of the text...

Placing any of these characters in the midst of the caption results in WYSIWYG = [ this is !@# a test ] looks like { this is !@# a test } on the Button1 as expected.

After goofing around with this for almost an hour I find that my initial thought about lanugage was indeed close to correct. It was the BidiMode of the Button1 properties.

I thought I would share and that's about it. I was certain that the TButton class was just completely broken. But no - as usual, I was overlooking something simple. As it is almost always when we only see the button and nothing around it. Carry on.

Cheers -
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02