Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Color coded list box?
Message
From
03/10/2001 08:31:09
 
 
To
03/10/2001 08:04:27
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00563047
Message ID:
00563514
Views:
39
Hi!

From what I know, there could be 10 color pairs that define colors for different elements include the slected item. Try:
DEFINE BAR 1 OF colorlist PROMPT "Red" COLOR ,RGB(254,0,0,255,0,0),,,RGB(0,0,127,0,0,128),RGB(0,0,127,0,0,128)

5-th define back color and 6-th - fore color of the item when it is selected.

You can use spaces instead of the caption:
DEFINE BAR 1 OF colorlist PROMPT " " COLOR RGB(255,0,0,255,0,0),RGB(255,0,0,255,0,0),RGB(255,0,0,255,0,0),RGB(255,0,0,255,0,0),RGB(255,0,0,255,0,0),RGB(255,0,0,255,0,0)

Above generates line that contains only red background does not matter if you select item.

>Hi again Vlad
>
>OK, figured out that if you change the RGB() color setting in Nick's sample to an RGB color-pair then you achieve the desired result. i.e.
>
>DEFINE BAR 1 OF colorlist PROMPT "Red" COLOR ,RGB(254,0,0,255,0,0)
>
>This will create a Red bar as the 1st element. The name "Red" will only appear when you highlight that row because of the highlight color settings of the combo box. I am sure one can set the highlight colours to a dynamic setting to reflect the current highlighted element? I'll try it.
>
>Note that you have to make the first (foreground) RGB color slightly different from the second (background) RGB setting otherwise it does some type of XOR (or something) which cancels the foreground and background settings out leaving just a white bar with faded text?
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform