Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ListBox item color
Message
De
29/05/2006 08:45:31
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
29/05/2006 08:22:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01125646
Message ID:
01125649
Vues:
19
>I have a question for any of you that can help me out....
>
>Is is possible to set or change color of an individual item in a listbox control ? I know it is possible to change color for all items simuntaneously but I can't seem to change it for just one item.....any help is appreciated.............
>
>Salute.......

Yes it's possible but not worth the effort IMHO.
Public oForm
oForm = Createobject('myForm')
oForm.Show

Define Class myForm As Form
  Add Object myListBox As ListBox With ;
    top = 10, Left = 10, Height = 200, Width = 180

  Procedure myListBox.Init
Define Popup myPop Font [Arial],12 Style [B]
Define Bar 1 Of myPop Prompt 'element 1' ;
  FONT [Arial],12 Style [B]  ;
  COLOR ,Rgb(,,,212,208,200),,,,Rgb(255,255,255,0,0,128)
Define Bar 2 Of myPop Prompt 'element 2' ;
  FONT [Arial],12 Style [BI] ;
  COLOR ,Rgb(,,,212,208,200),,,,Rgb(255,255,255,0,0,128)
Define Bar 3 Of myPop Prompt 'element 3' ;
  FONT [Arial],12 Style [I]  ;
  COLOR ,Rgb(255,255,255,255,0,0),,,,Rgb(255,0,0,255,255,0)
Define Bar 4 Of myPop Prompt 'element 4' ;
  FONT [Arial],8   ;
  COLOR ,Rgb(0,255,0,255,255,0),,,,Rgb(255,0,0,0,255,255)

With This
  .RowSourceType = 9
  .RowSource = 'myPop'
  .ColumnCount = 2
  .ColumnLines = .T.
  .ColumnWidths = '130,20'
  For ix=1 To 4
    .List(m.ix,2) = 'C'+Trans(m.ix)
  Endfor
Endwith
Endproc
Enddefine
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform