Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo disabledbackcolor problem
Message
From
07/04/2005 20:13:00
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Combo disabledbackcolor problem
Miscellaneous
Thread ID:
01002484
Message ID:
01002484
Views:
75
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
Next
Reply
Map
View

Click here to load this message in the networking platform