Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid with a ComboBox
Message
From
22/12/1998 10:41:19
 
 
To
22/12/1998 10:32:47
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00169648
Message ID:
00169657
Views:
24
>I am having a problem with a Grid and a ComboBox. I have a grid that uses the DynamicBackColor property for each column like the following code.
>
>IIF(MOD(RECNO(),2)=1,RGB(255,255,255),RGB(192,220,192))
>
>This alternates every other line of the grid to be a different color than white. This works great until I put a ComboBox in a column that requires me to turn the Sparse of that column to .F. Well I have partial correct my problem by going to the following 2 properties of the of the ComboBox. They are DisabledBackColor and ItemBackColor. By putting the following line in those properties:
>
>=IIF(MOD(RECNO(),2)=1,RGB(255,255,255),RGB(192,220,192))
>
>I get half the result I am looking for. When I am in my Edit mode that Enables the ComboBox in that column, I get the alternating BackColors that I want. When I am not in Edit mode and the ComboBox is disabled, it is not showing all rows with a white BackColor as if it is ignoring the DisabledBackColor property.
>
>Does anyone have a suggestion as to how I can fix this? Thanks.

I think you may avoid using Combo.Enabled=.f. Instead you can just prevent control from getting focus, bu returning .F. from Combo.When event or shifting focus from Combo.GotFocus event. Another way is to avoid using combo in grid at all: they may be conveniently replaced by right-click shortcut menus.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform