MSHFlexGrid ScrollBar Question 
Author Message
 MSHFlexGrid ScrollBar Question

Hi all

I'm using a MSHFlexGrid to show records from a recordset. All the fileds I
select from the recordset are from the same table.

I've succeeded to insert checkbox into the grid but now I have a problem
with the vertical Scrol bar. When I try to scroll, the checkboxes loose
theire connection to the row, and 'jump' out of the grid.

The code I wrote is:

code:--------------------------------------------------------------
Private Sub Combo1_GotFocus()
    With hfgPrClb
        Call objQuery.GetPerClub(iPersonSysNo)
        Set .DataSource = rsQuery
        hfgPrClb.Col = 3
        hfgPrClb.AddItem ""
        For i = 1 To iCount - 1
            hfgPrClb.Row = i
            chkMark(i).Value = 0
            chkMark(i).Top = hfgPrClb.CellTop + hfgPrClb.Top
            chkMark(i).Height = hfgPrClb.CellHeight
            chkMark(i).Left = hfgPrClb.CellLeft + hfgPrClb.Left - 150
            chkMark(i).Width = 255
            chkMark(i).ZOrder 0
            Call addChkMark
        Next i
end sub

The next sub add checkboxes

Public Sub addChkMark()
    Load chkMark(chkMark.UBound + 1)
    chkMark(chkMark.UBound).Visible = True
    chkMark(chkMark.UBound).Move chkMark(1).Left, chkMark(chkMark.UBound -
1).Top + hfgPrClb.CellHeight, chkMark(1).Width, chkMark(1).Height
End Sub

and the Next sub should deal with the scrol

Private Sub hfgPrClb_Scroll()
    n = 1
    chkMark(n).Top = hfgPrClb.CellHeight
    chkMark(n).ZOrder
    For m = n + 1 To n + 19
        chkMark(m).Top = chkMark(m - 1).Top + hfgPrClb.CellHeight
        chkMark(m).ZOrder
    Next
End Sub

Thanks,
Ohad



Wed, 22 Sep 2004 15:07:57 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. MSHFlexGrid ScrollBar Question

2. msHflexgrid scrollbar

3. how to make MshFlexgrid scrollbar visible ?

4. MSHFlexGrid Scrollbar properties?

5. Flash Scrollbar or Change Scrollbar Color

6. When the Treeview scrollbar moves the FlexGrid Scrollbar should also move

7. Datagrid Scrollbar Question

8. 2 new 2 b called newbie - scrollbar question

9. Newbie ScrollBar Question

10. Simple question about a scrollbar property: Flashing Bar

11. Newbie ScrollBar Question

12. Seeking 2-Dimensional Scrollbar (Newbie Question)

 

 
Powered by phpBB® Forum Software