StrataFrame Forum

How to change disabled forecolor

http://forum.strataframe.net/Topic9439.aspx

By Tim Dol - 6/8/2007

I'm using the ManagedReadOnlyState functionality on my forms and it works great, except some users find it difficult to read the text when in readonly mode.  I want to change the forecolor of the disabled controls (text) to be the same as the enabled controls.  The background color is fine, I just want the text to be the same color regardless what mode you are in.

What is the easiest way to accomplish this?

Thanks

Tim

By Trent L. Taylor - 6/8/2007

If you are using the SF controls then you will need to just wait until the 1.6.1 release is final as you can change the disabled background color and fore color of the text.  If you are using Infragistics text boxes then it should already respect the disabled text color.
By Tim Dol - 6/8/2007

I am using Infragistic Controls, but I was wondering if there is some easy way to do this within StrataFrame without having to manually change the property of each control.

Thanks

Tim

By Trent L. Taylor - 6/8/2007

You could change the Infragistics wrapper code.  The IBusinessBindable interface forces a property named BindingEditable to be implemented on the control.  At the moment, the Infragistics wrapper just sets the enabled state of the control.  You can add the code here to change the disabled color as well.

       

Public Property BindingEditable() As Boolean Implements IBusinessBindable.BindingEditable
            Get
                Return Me.Enabled
            End Get
            Set(ByVal value As Boolean)
                Me.Enabled = value
               
                If Not value Then
                    '-- Set the disabled color text here
                End If
            End Set
        End Property
By Jerry J Jansen - 7/19/2007

Trent,



Has the ability to change the disabled forecolor of the textboxes been added to 1.6.1 as you stated in this thread? I would like to change the forecolor and I am using 1.6.1 but I don't find any way of doing this.



Thanks,
By Trent L. Taylor - 7/19/2007

I have only given that feature, as it is in beta, to a few developers.  The textbox has been changed but we still need to add functionality to the combo and masked textbox.  So it never made it into the official 1.6.1 release.