Click to See Complete Forum and Search --> : grid control scroll


newb
August 22nd, 2001, 05:36 AM
Hi!

Im having a problem with grid control.

When i try to change value of grid1.leftcol property, it doesnt change at all.

Why doesnt it change?

Grid1.leftcol is used to set leftest column number in grid control. (Is there
other way of doing this?)

I am using visual basic 6.0.

Newbie

michi
August 22nd, 2001, 10:47 AM
How about Grid1.FixedCols ?

Regards,

Michi

newb
August 23rd, 2001, 04:08 AM
grid1.fixedcols is the number of header columns in a grid. It doesnt
change the leftest column index at all.

Newbie

michi
August 23rd, 2001, 06:02 PM
I tested the LeftCol property of MSFlexGrid just now, it works fine for me. Would you please show your codes up?

Regards,

Michi

newb
August 24th, 2001, 01:07 AM
There is just a horizontal scroll and it should set new values to grids if
hscroll is moved.

grid1 and grid3 is MSFlexGrid and grid2 is MSHFlexGrid. These are both on version 6.0.

And the problem was that leftcols doesnt set to any value.

Code:

Public Sub HScroll1_Change()

Grid1.LeftCol = HScroll1.Value
Grid2.LeftCol = HScroll1.Value
Grid3.LeftCol = HScroll1.Value

End Sub

Grid1:

Begin MSFlexGridLib.MSFlexGrid Grid1
Height = 855
Left = 120
TabIndex = 17
TabStop = 0 'False
Top = 720
Width = 5655
_ExtentX = 9975
_ExtentY = 1508
_Version = 393216
Rows = 3
Cols = 21
FixedRows = 0
BackColorFixed = 12632256
ScrollTrack = -1 'True
Enabled = -1 'True
ScrollBars = 0
End

Grid2:

Begin MSFlexGridLib.MSFlexGrid Grid2
Height = 2775
Left = 120
TabIndex = 50
Top = 1560
Width = 5895
_ExtentX = 10398
_ExtentY = 4895
_Version = 393216
Rows = 250
Cols = 21
FixedRows = 0
BackColorFixed = 12632256
ScrollBars = 2
End