SBX - Search With Button

SBX - Forum Post Title

How to use Textboxes as labels in Pages?

Microsoft Dynamics NAV Forum

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

Question Status

Verified

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
Brad_P responded on 17 Oct 2017 11:49 AM
My Badges
Suggested Answer

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
My Badges

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

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

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
My Badges

Thanks Brad! Its working as you said.

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

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

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

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
Brad_P responded on 17 Oct 2017 11:49 AM
My Badges
Suggested Answer

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
Brad_P responded on 17 Oct 2017 1:16 PM
My Badges
Suggested Answer

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

Reply

SBX - Two Col Forum

SBX - Migrated JS