AdvancedHMI Software

General Category => Support Questions => Topic started by: automatizzando on November 11, 2016, 10:42:18 AM

Title: Assign new color to the property LightColor1
Post by: automatizzando on November 11, 2016, 10:42:18 AM

How do I assign a new color to a property of an object by code?
I wrote this code, but it creates me error.

Code: [Select]
PilotLight3Color2.LightColor1 = "Red"

Thanks for your help
Title: Re: Assign new color to the property LightColor1
Post by: Godra on November 11, 2016, 10:56:24 AM
It should be:

PilotLight3Color2.LightColor1 = AdvancedHMI.Controls.PilotLight3Color.LightColors.Red

Visual Studio should show available options as soon as you type equal sign ("=").
Title: Re: Assign new color to the property LightColor1
Post by: automatizzando on November 11, 2016, 02:39:56 PM
Grazie Mille