Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

How to use Textboxes as labels in Pages?

Posted on by Microsoft Employee

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,

*This post is locked for comments

  • Suggested answer
    Brad_P Profile Picture
    Brad_P 1,542 on at
    RE: How to use Textboxes as labels in Pages?

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

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to use Textboxes as labels in Pages?

    Thanks Brad! Its working as you said.

  • Verified answer
    Brad_P Profile Picture
    Brad_P 1,542 on at
    RE: How to use Textboxes as labels in Pages?

    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."

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: How to use Textboxes as labels in Pages?

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

  • Suggested answer
    Brad_P Profile Picture
    Brad_P 1,542 on at
    RE: How to use Textboxes as labels in Pages?

    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans