set button "Fill" property in script?

Discussion of application development using iX Developer, including but not limited to getting started, using the functions tab, properties, objects and installation.
Post Reply
mmarks
Posts: 4
Joined: Fri Jan 15, 2016 2:39 am

set button "Fill" property in script?

Post 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?

ianrobo75
Posts: 12
Joined: Mon Sep 22, 2014 6:15 pm

Re: set button "Fill" property in script?

Post 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)

Post Reply