Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Freezing Grid Columns
Message
From
25/07/2000 10:07:58
David Fluker
NGIT - Centers For Disease Control
Decatur, Georgia, United States
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00393290
Message ID:
00396571
Views:
17
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform