Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: set button "Fill" property in script?
PostPosted: Fri Jan 15, 2016 3:39 am 

Joined: Fri Jan 15, 2016 2:39 am
Posts: 4

Offline
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
Quote:
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:
TotalStopBtn.Fill = 939393;


Does anyone know of a way to set the button properties the way that I want?


 Profile  
 
 Post subject: Re: set button "Fill" property in script?
PostPosted: Tue Jun 07, 2016 3:45 pm 

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

Offline
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/library/system.windows.media.colors(v=vs.110).aspx)


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: