Ask a Question

Change Button color property in Userform

cauline
Contributor

Change Button color property in Userform

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?

 

Thank you.

C

5 REPLIES 5
shankar_r
Community Hero

Before setting the color for button you must make the cxbcPressed flag to true as below

 


Button.PNG

 

 


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

I am unable to set this property in the script.  It is not available:

 

Error The object does not support this property or method. Error location: Unit: "TC.G2_0\UlineTestApp\Script\MainForm" Line: 20 Column: 50.

Error
The object does not support this property or method.

Capture.PNG

@caulineI have edited my post, As per my understanding there is no way to set cxbcPressed value thru script.

 

You should make flag to true during design itself.

 


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

HKosova
SmartBear Alumni (Retired)

Custom button colors are only used when using the Windows Classic theme or TestComplete UI theme Standard, Enhanced or Flat. I'm afraid this is by design.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: