Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to change the color of the disabled combobox in vb.n
Message
 
À
03/12/2010 10:24:01
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01491670
Message ID:
01491758
Vues:
29
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform