Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids
Message
From
21/08/1999 18:11:01
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Re: Grids
Miscellaneous
Thread ID:
00256211
Message ID:
00256339
Views:
23
This is a kludge, but you could do it with two Grids. The example below isn't perfect, so you'll have to play with LockScreen a bit.

Dave

*!* Begin 2 Columns Always Visible Grid Code

PUBLIC oForm
oForm = CREAT([oMyForm])
oForm.SHOW

DEFINE CLASS oMyForm AS FORM
WIDTH = 500

ADD OBJECT oBottomGrid AS oMyBottomGrid WITH ;
TOP = 25, ;
LEFT = 25, ;
WIDTH = 420

ADD OBJECT oTopGrid AS oMyTopGrid WITH ;
TOP = 25, ;
LEFT = 25, ;
WIDTH = 197, ;
HEIGHT = 180, ;
SCROLLBARS = 0

ADD OBJECT oPaintForm AS oMyTimer

PROC INIT
LOCKSCREEN = .T.
THIS.oBottomGrid.DOSCROLL(5)
THIS.oBottomGrid.DOSCROLL(4)
LOCKSCREEN = .F.
THIS.REFRESH
THIS.CLICK
ENDPROC
ENDDEFINE

DEFINE CLASS oMyBottomGrid AS GRID
RECORDSOURCE = [labels.dbf]
RECORDSOURCETYPE = 0

PROC SCROLLED
LPARAMETERS nDirection
THISFORM.LOCKSCREEN = .F.
THISFORM.oTopGrid.ZORDER(0)
THISFORM.LOCKSCREEN = .T.
THISFORM.PAINT
THISFORM.REFRESH
ENDPROC

PROC INIT
THIS.SETALL([Width], 50, [Column])
ENDPROC
ENDDEFINE

DEFINE CLASS oMyTopGrid AS GRID
RECORDSOURCE = [labels.dbf]
RECORDSOURCETYPE = 0

PROC INIT
THIS.SETALL([Width], 50, [Column])
ENDPROC
ENDDEFINE

DEFINE CLASS oMyTimer AS TIMER
INTERVAL = 100

PROC TIMER
THISFORM.LOCKSCREEN = .F.
THIS.ENABLED = .F.
ENDPROC
ENDDEFINE

*!* End Code


>I am interested in knowing how to fix the first 2 columns in my Grid
>so that when I scroll horizontally the first 2 columns are always visible.
Previous
Reply
Map
View

Click here to load this message in the networking platform