Author Topic: Assign new color to the property LightColor1  (Read 932 times)

automatizzando

  • Newbie
  • *
  • Posts: 15
    • View Profile
Assign new color to the property LightColor1
« 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

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Assign new color to the property LightColor1
« Reply #1 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 ("=").

automatizzando

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: Assign new color to the property LightColor1
« Reply #2 on: November 11, 2016, 02:39:56 PM »
Grazie Mille