I am working on existing code. I am trying to programmatically set the BackColor for a RichTextEdit control at runtime and cannot seem to get it to work.
In the Layout designer, the BackColor is set to 'Window Background' via the dropdown selection on the General Properties Tab.
Code in the open() function sets the BackColor to Gray / ButtonFace via rte.BackColor = RGB(217,213,206). This works fine.
I am adding functionality to allow certain user roles to be able to make edits to the text in the RichTextEdit control and I want to set the BackColor back to the Window Background color when they can edit.
Are there predefined constants that define system color values like 'Window Background' so they can easily be referenced during code execution?
I have tried setting the RichTextEdit BackColor to WHITE via rte.BackColor = RGB(255,255,255) but the color does not change.
I appreciate any assistance on how to programmatically change the BackColor of a RichTextEdit and any limitations.
In the Layout designer, the BackColor is set to 'Window Background' via the dropdown selection on the General Properties Tab.
Code in the open() function sets the BackColor to Gray / ButtonFace via rte.BackColor = RGB(217,213,206). This works fine.
I am adding functionality to allow certain user roles to be able to make edits to the text in the RichTextEdit control and I want to set the BackColor back to the Window Background color when they can edit.
Are there predefined constants that define system color values like 'Window Background' so they can easily be referenced during code execution?
I have tried setting the RichTextEdit BackColor to WHITE via rte.BackColor = RGB(255,255,255) but the color does not change.
I appreciate any assistance on how to programmatically change the BackColor of a RichTextEdit and any limitations.