How to use Textboxes as labels in Pages?

Question Status

Verified
Zulfi asked a question on 17 Oct 2017 10:30 AM

Hi,

I am using textbox as a label because I have to change text content based on conditions. The issue is I can not hide border of the textbox. Is it possible?

Additionally, I want to change the color of this label text box. So is it possible to change color through C/AL. Right now I have a Boolean variable for StyleExpr property of control and able to switch between two colors. How about additional colors?

Thanks,

Reply
Suggested Answer
Brad_P responded on 17 Oct 2017 11:49 AM

Hi,

You can set the CaptionClass of the text box to display a variable caption. You can set this variable when the page is opened for example.

The StyleExpr would need to be variable that has one of the StyleValues.

Reply
Zulfi responded on 17 Oct 2017 12:01 PM

The StyleExpr is a Boolean. Therefore, only able to change between default and one other style

Reply
Verified Answer
Brad_P responded on 17 Oct 2017 12:09 PM

The StyleExpr is not only a boolean.

"You can set StyleExpr to either the name of a variable; a text constant in apostrophes, for example, 'strong'; or, for backward compatibility, to true or false."

Reply
Zulfi responded on 17 Oct 2017 12:46 PM

Thanks Brad! Its working as you said.

Reply
Suggested Answer
Brad_P responded on 17 Oct 2017 1:16 PM

Awesome.  Please mark answers as verified if they helped you to resolve your issue.

Reply
Verified Answer
Brad_P responded on 17 Oct 2017 12:09 PM

The StyleExpr is not only a boolean.

"You can set StyleExpr to either the name of a variable; a text constant in apostrophes, for example, 'strong'; or, for backward compatibility, to true or false."

Reply
Suggested Answer
Brad_P responded on 17 Oct 2017 11:49 AM

Hi,

You can set the CaptionClass of the text box to display a variable caption. You can set this variable when the page is opened for example.

The StyleExpr would need to be variable that has one of the StyleValues.

Reply
Suggested Answer
Brad_P responded on 17 Oct 2017 1:16 PM

Awesome.  Please mark answers as verified if they helped you to resolve your issue.

Reply