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.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement