Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo disabledbackcolor problem
Message
De
07/04/2005 20:13:00
Alan Harris-Reid
Baseline Data Services
Devon, Royaume Uni
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Combo disabledbackcolor problem
Divers
Thread ID:
01002484
Message ID:
01002484
Vues:
70
Using VFP8, I have a combo within a container class and I would like the disabledback color of the combo the same as the form background. As there is no combo.backstyle (ie. opaque/transparent) property, I have the following code in my baseclass combo.init...

IF TYPE('this.Parent.BackColor') # 'U'
this.DisabledBackColor = this.Parent.BackColor
ENDIF

The container.backstyle property is set to 0 (transparent).

The problem is that when the combo is disabled it has the container's background color, not the required form background color (although the container background is transparent). I guess this is because the combo.init fires before the container has set it's background color to that of the form, and doesn't re-adjust when the container background color changes (a good case for a combo.load() event?)

Is there any way around this problem? I know I can manually set combo.disabledbackcolor to that of the form, but I am looking for a more generic solution.

BTW, If I place the combo class directly on the form (ie. not within a container on the form) the disabled background color is correct.


Any help would be appreciated.

Alan
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform