Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combobox Colors
Message
 
À
14/04/2005 09:05:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows '98
Network:
Novell 6.x
Database:
Visual FoxPro
Divers
Thread ID:
01003494
Message ID:
01004604
Vues:
51
Here is an example using a listbox (I have found that this technique does not work with combobox)
PUBLIC oform1
oform1=CREATEOBJECT("form1")
oform1.Show
RETURN
DEFINE CLASS form1 AS form
    Top = 0
    Left = 0
    Height = 238
    Width = 468
    DoCreate = .T.
    Caption = "Form1"
    Name = "Form1"
   ADD OBJECT list1 AS listbox WITH ;
        RowSourceType = 9, ;
        RowSource = "P_list", ;
        Height = 181, ;
        Left = 60, ;
        Top = 24, ;
        Width = 265, ;
        Name = "List1"
    PROCEDURE Load
        PUBLIC P_list
        DEFINE POPUP P_list
        DEFINE BAR 1 OF P_LIST ;
          PROMPT "Item number 1 of the list";
          FONT "Tahoma",14 style "BI";
          COLOR , RGB(255,255,255,192,0,0)
        DEFINE BAR 2 OF P_LIST ;
          PROMPT "Item number 2 of the list";
          FONT "Tahoma",11 style "B"
        DEFINE BAR 3 OF P_LIST ;
          PROMPT "Item number 3 of the list";
          FONT "Arial",9 style "B";
           COLOR , RGB(255,255,255,192,255,0)
    ENDPROC
ENDDEFINE
>>>Is there any way to display different colors of different items in a combobox based on a condition instead of changing all items in the combobox object?
>>
>>You may even change fonts if your listbox or combo is based on a colorful popup, but you'll lose some other stuff - multiselect, incremental search or some like that. Not sure what stops working for some rowsource types.
>>
>>Haven't tried that myself, but I know it's been done.
>
>
>Do you remember whom it was who did it so that I may get ahold of them and get an idea on how to?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform