How to change color in snippets

0 votes
15 views
asked Apr 26, 2016 by Sancho

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
answered May 2, 2016 by Maria Molodova (8,320 points)
selected May 2, 2016 by qandaadmin
 
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

FAQ questions

Installation and License


Coding


Eye-tracking


EEG Analysis


Visual Stimuli


Runtime and Data Collection


Hardware

...