Ask a Question

newb question

Sandyno
Occasional Visitor

newb question

Hello,

 

I am unable to change the color property for a TcxButton type:

UserForms.AppMain.RunScript.Colors.Pressed = clRed;

What is the appropriate way to set the button color property?

 

useful links for leisure time:
https://forcedporn.fun
https://forcedporn.club
https://forcedporn.site

 

 

 

 

 

 

2 REPLIES 2
rraghvani
Trusted Contributor

You won't be able to change the colour like that. You'll have to create a name mapping for your colour  object or use coordinates instead.

KB1
Frequent Contributor

 

In TestComplete, you can use the "BackColor" property to set the background color of a button. To set the button color to red, you can use the following code:

 
UserForms.AppMain.RunScript.Colors.BackColor = clRed;

Note that "clRed" is a predefined constant in TestComplete that represents the color red.

If you want to set the text color of the button, you can use the "ForeColor" property. For example:

 

UserForms.AppMain.RunScript.Colors.ForeColor = clWhite;

 

This will set the text color of the button to white.

cancel
Showing results for 
Search instead for 
Did you mean: