Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Freezing Grid Columns
Message
De
25/07/2000 10:07:58
David Fluker
NGIT - Centers For Disease Control
Decatur, Georgie, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00393290
Message ID:
00396571
Vues:
14
>Hi All,
>
>In VFP 6.0, is there a way to "freeze" a grid column's order without having to play around with the "partition" property and splitting the grid? I have a column with a check box that I would like to remain at the left edge of the grid regardless of user horizontal scrolling actions.
>
>Thanks,
>
>Jimmy D.

Jimmy,

Sorry this is a week late, you probably have a solution by now, but if not this works well.

Put the following code in the AfterRowColumnChange method of the grid:
WITH This
  IF .LeftColumn != 1 
    IF .Partition = 0
      ThisForm.LockScreen = .T.
      .Partition = .Column1.width + 1
      .PanelLink = .F.
      .Panel = 0
      .ScrollBars = 0
      .Panel = 1
      .ScrollBars = 3
      .DeleteMark = .F.
      .RecordMark = .F.
      .PanelLink = .T.
      ThisForm.LockScreen = .F.
    ENDIF
  ELSE
    IF .Partition > 0
      ThisForm.LockScreen = .T.
      .Partition = 0
      .DeleteMark = .T.
      .RecordMark = .T.
      ThisForm.LockScreen = .F.
    ENDIF
  ENDIF
ENDWITH
The .Lockscreen controls the flicker and you can remove the .deletemark and .recordmark if you have them turned off in your grid.

David.
David.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform