Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Font colors in combo or list boxes
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00365988
Message ID:
00366069
Vues:
21
Here is something you could do.

The listbox has a RowSourceType (9 - Popup) that can accomplish what you are talking about, but it has limitations.

Create a form and drop a listbox on it
Name the listbox lstColors
In the Init of the form put the following:

DEFINE POPUP PrettyColors
DEFINE BAR 1 OF PrettyColors PROMPT "Red" COLOR ,W+/R
DEFINE BAR 2 OF PrettyColors PROMPT "Blue" COLOR ,W+/B
DEFINE BAR 3 OF PrettyColors PROMPT "Green" COLOR ,W+/G

this.lstColors.RowSourceType = 9
this.lstColors.RowSource = "PrettyColors"

Run the form.

You can also change the font, fontsize, style (Bold, Italic,Underline) of individual items. This technique can be used to put color in menu popups too!

The problem with this technique is that to change the contents of the listbox, you must redefine the popup.



>I"d like to put color names with a block of that color besides it in a combo or listbox. If I use FoxFont I can get the block with repetitive ALT+0219 or CHR(219). Is this possible or will I have to do some makeshifts? - create bmps, etc. While I'm at it, is FoxFont automatically installed with Runtime?
>
>BLACK XXXX
>BLUE  XXXX
>RED   XXXX
>WHITE XXXX
>
>
>Thanks
Rick Hodder
MCP Visual Foxpro
C#, VB.NET Developer
Independent Consultant
www.RickHodder.com
MyBlog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform