Changing Tab control text removes trailing spaces

Hi,

I’m experimenting on some design on a sheet control with tabs having it look like the text is horizontally centered in each tab. I have created a sample program for demonstration
DynamicTabText.zip (1.0 MB)

With this sample program, I created 3 tabs with text having 5 leading and 5 trailing spaces to make it look like centered. But when changing the tab text on runtime having the same 5 leading and trailing spaces, It removes 5 trailing spaces on the tabs. Is there any other workaround to bypass this kind of ruling?

Internally the RTL uses CSTRINGS so the trailing spaces are removed. Add a trailing NUL when you change the text, ie: = ’ yada yada yada <0>’ and the trailing spaces should not be removed.

3 Likes

Worked like a charm, Thank you Sir. :grinning: