Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Answered

How to Change the Text color of Dialog Box

Posted on by 434

Hi,

I have to Change the color of the Text in the Dialog Box,Instead of Black color Text it should be in Red Color. Any Suggestions please .

DialogTextcolor.png

Regards,

Ram.

  • pcrengnr Profile Picture
    pcrengnr 5 on at
    RE: How to Change the Text color of Dialog Box

    Ludvig,

    You don't have the right to judge another users request/question and attempt to make them feel stupid for even asking.

    You may & should, however, discuss how easy or difficult the task is. Is it a change to Windows. Is it a change to office. Can it be accomplished via VBA etc.

    My issue with some of the dialog boxes text color myself, is that it has now become some faded gray color which is ridiculous and is somewhat difficult to see.

    To insinuate that someone's request is not welcome is just wrong. Always remember there are no stupid questions.

    Karma always finds a way.

  • Ram Kumar Profile Picture
    Ram Kumar 434 on at
    RE: How to Change the Text color of Dialog Box

    Hi Sergei,

    Thank you so much it works. Have a good Day.

    Regards,

    Ram.

  • Verified answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,089 on at
    RE: How to Change the Text color of Dialog Box

    Hi Ram,

    Wrap the text with <b> tag

    <p style="color:red;"><b>This is a bold red text</b></p>

  • Ram Kumar Profile Picture
    Ram Kumar 434 on at
    RE: How to Change the Text color of Dialog Box

    Hi Sergei ,

    How to make my text bold with the color changed.

    Regards,

    Ram

  • Crispin John Augustine Profile Picture
    Crispin John Augustine 37,081 on at
    RE: How to Change the Text color of Dialog Box

    Yes, Yes and no command buttons manually.

  • Ram Kumar Profile Picture
    Ram Kumar 434 on at
    RE: How to Change the Text color of Dialog Box

    Hi Sergei,

    Thanks it works fine for me.

    Regards,

    Ram.

  • Ram Kumar Profile Picture
    Ram Kumar 434 on at
    RE: How to Change the Text color of Dialog Box

    Hi Crispin,

    Yeah i have added the text should i add yes and No buttons there manually.

    Regards,

    Ram

  • Crispin John Augustine Profile Picture
    Crispin John Augustine 37,081 on at
    RE: How to Change the Text color of Dialog Box

    Design>>new control>>Static text (for example)

    Once you added the text, you can set it's font, from the properties

  • Ram Kumar Profile Picture
    Ram Kumar 434 on at
    RE: How to Change the Text color of Dialog Box

    Hi Crispin,

    I have Created a form with property 'always on top' to yes. Where Should i add the Condition Text .

    Regards,

    Ram.

  • Verified answer
    Sergei Minozhenko Profile Picture
    Sergei Minozhenko 23,089 on at
    RE: How to Change the Text color of Dialog Box

    Hi,

    Just make a copy of yesYesAllNoCancel method from Box class with a minor change like below.

    public client static DialogButton yesNoTest(
        str             _text,
        DialogButton    _defaultButton,
        str             _title = "@SYS11132",
        boolean         _modal = false)
    {
        Args    args;
        Object  formRunObj;
        FormRun formRun;
        ;
        args = new Args();
        args.name(formstr(SysBoxForm));
        formRun = classfactory.formRunClass(args);
        formRun.init();
        formRunObj = formRun;
        formRunObj.setTitle(_title);
        formRunObj.setText(_text, false);
        formRunObj.setType(DialogBoxType::YesNoBox);
        formRunObj.parmDefaultButton(_defaultButton);
        formRun.run();
        formRun.wait(_modal);
        return formRunObj.dialogButton();
    }

    And test it with code:

    Box::yesNoTest('

    This is a red text

    ', DialogButton::Yes);

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,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans