Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to change the color of the disabled combobox in vb.n
Message
 
To
03/12/2010 10:24:01
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01491670
Message ID:
01491758
Views:
28
>Hi,
>I want to change fore color of disabled combo box in vb.net.
>it only grey only.
>
>Please advise.
>Derek Yim

What I have done is "give" the combox a textbox (t in the code)
        Me.t = New txtBase
        Me.t.Width = Me.Width
At "disbable-ing" time you would then ...
               Me.t.BringToFront()
                Me.t.Visible = True
                Me.t.Text = Me.Text
and set t's fore and back colors at your convenience.

When the combobox is enabled, me.t.visible should be set to false.

It works surprisingly well I must say.

Hope it will work for you too. Don't hesitate to ask in case I left out crucial information.

Kind regards,

Marc

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Previous
Reply
Map
View

Click here to load this message in the networking platform