Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
Problem with Infragistics.Win.Misc.UltraButton
posted

Hi

We are using Infragistics.Win.Misc.UltraButton v12.1 and we make the button enabled / disabled in code. I have a problem

Background:

Idea is when enabled Button is shown as grey and when enabled as white. It works in almost all cases.

private void InitializeComponent()
{
Infragistics.Win.Appearance appearance4 = new Infragistics.Win.Appearance();
Infragistics.Win.Appearance appearance7 = new Infragistics.Win.Appearance();
this.ultraButton1 = new Infragistics.Win.Misc.UltraButton();
this.SuspendLayout();
//
// ultraButton1
//

appearance4.BorderAlpha = Infragistics.Win.Alpha.Transparent;
appearance4.ForeColorDisabled = System.Drawing.Color.DimGray;
appearance4.Image = global::ThermoControls.Properties.Resources.grid_delete;
appearance4.ImageBackground = global::ThermoControls.Properties.Resources.toggle_button; // the white button
appearance4.ImageBackgroundAlpha = Infragistics.Win.Alpha.Opaque;
appearance4.ImageBackgroundDisabled = global::ThermoControls.Properties.Resources.toggle_button_disabled; // the grey button
appearance4.ImageHAlign = Infragistics.Win.HAlign.Center;
this.ultraButton1.Appearance = appearance4;

But then on one occasion when I put the ultraButton1.Enabled to true the button remains grey.

I am also kind of surprised the ultraButton1.appearance4.ImageBackground is not constant after the InitializeComponent() is called when I watch it in Watch window.

Jukka