Page 1 of 1

set button "Fill" property in script?

Posted: Fri Jan 15, 2016 3:39 am
by mmarks
I have a screen where I show the alarms, I'm filtering the alarm view in script by pressing different buttons which is working fine.
What I now want to do is to change the button appearance of the button I just pressed to give the user an indication of which type of filtering that is active.
What I want to do exactly is to change the color of it and set a gradient, you can do this manually in IX developer by using the Fill property.

I tried to set a color by using the Fill property as seen in the code below but it gives me the error
Cannot implicitly convert type 'int' to 'Neo.ApplicationFramework.Common.Graphics.Logic.BrushCF'
And this is where I get stuck, I can't find any info about this BrushCF (or I don't understand it) when using the built-in help and google turns up nothing.

Code: Select all

TotalStopBtn.Fill = 939393;
Does anyone know of a way to set the button properties the way that I want?

Re: set button "Fill" property in script?

Posted: Tue Jun 07, 2016 3:45 pm
by ianrobo75
bit late reply but...

use this...
TotalStopBtn.Fill = System.Drawing.Color.FromArgb(0x939393);

Also consider using TotalStopBtn.Fill = color.Red or whatever named colour you want from the list (see here https://msdn.microsoft.com/en-us/librar ... .110).aspx)