Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Visual bar in a grid
Message
De
04/12/2007 13:10:07
 
 
À
04/12/2007 10:17:07
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01273044
Message ID:
01273099
Vues:
13
>
>Public oForm
>oForm = Createobject('myForm')
>oForm.Show
>
>Define Class myForm As Form
>  Add Object myGrid As Grid
>
>  Procedure Load
>    Create Cursor myProcess (percent i, Name c(10))
>    Rand(-1)
>    For ix = 1 To 100
>      Insert Into myProcess Values (Int(Rand()*100),Sys(2015))
>    Endfor
>  Endproc
>
>  Procedure Init
>    With This.myGrid.Columns(1)
>      .AddObject('myPercent','myContainer')
>      .myPercent.Width = .Width
>      .myPercent.lblPercent.Width = .Width
>      .myPercent.Visible = .T.
>      .DynamicFontBold = "thisform.UpdateContainer(this.columns(1).myPercent)"
>      .CurrentControl = 'myPercent'
>      .Sparse = .F.
>    Endwith
>  Endproc
>
>  Procedure UpdateContainer(toContainer)
>    With toContainer
>      .shpPercent.BackColor = Iif(percent>90,0xFF,0x00FF00)
>      .shpPercent.Width = toContainer.Parent.Width * percent/100
>      .lblPercent.Caption = '%'+Ltrim(Str(percent))
>    Endwith
>  Endproc
>Enddefine
>
>Define Class myContainer As Container
>  BackColor=0xFFFFFF
>  BorderWidth=0
>  Add Object shpPercent As Shape With BorderStyle = 0
>  Add Object lblPercent As Label With Alignment = 2 ,BackStyle=0
>Enddefine
>
Cetin

All right.

Thank you very much
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform