How to change the text colour of field using X++
Views (5710)
Hi,
Today i am going to discuss how to change the text colour of StringEdit contol through X++ code.
For that drop a StringEdit control named as 'TextControl' on a form.
Set its AutoDeclaration property to 'Yes'.
In the run method of the form, write the following code.
Today i am going to discuss how to change the text colour of StringEdit contol through X++ code.
For that drop a StringEdit control named as 'TextControl' on a form.
Set its AutoDeclaration property to 'Yes'.
In the run method of the form, write the following code.
TextControl.colorScheme(FormColorScheme::RGB);
TextControl.foregroundColor(WinAPI::RGB2int(255,0,0));
That's it. The text colour of the Name field appears red.
Happy coding!
This was originally posted here.

Like
Report
*This post is locked for comments