Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Visual bar in a grid
Message
De
04/12/2007 10:17:07
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
04/12/2007 09:46:46
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:
01273058
Vues:
18
This message has been marked as the solution to the initial question of the thread.
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
Ç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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform