0 votes
230 views
by

Can you please explain how to change a color linked to a proxy variable? This does not work:

BackgroundColor=Color.FromArgb(25,0,0);

 

1 Answer

0 votes
by (8.7k points)
selected by
 
Best answer

There is a type mismatch in your example. BackgroundColor proxy is the built-in stColor type, whereas Color.FromArgb() is a GDI+ function that returns the system System.Drawing.Color type. To match types, simply use a special field of stColor type:

BackgroundColor.GDIColor=Color.FromArgb(25,0,0);

Alternately, the color value can be changed with an optional stColor constructor:

BackgroundColor=new stColor(25,0,0);

There is a dedicated page in our wiki showing more examples of dealing with stColor type:

http://wiki.okazolab.com/Built-in%20data%20types.ashx?From=Custom-data-types#_stColor_type_10

Welcome to EventIDE Q&A forum where you can ask questions about EventIDE software and receive answers from other members of the community

Categories

FAQ questions

Installation and License


Coding


Eye-tracking


EEG Analysis


Visual Stimuli


Runtime and Data Collection


Hardware

...