Link to home
Start Free TrialLog in
Avatar of mccainz2
mccainz2

asked on

Problem placing scrollbar controls in flexgrid cells

App consists of a single form which contains a frame and inside that frame is a flexgrid and a indexed vertical scrollbar...

I cannot get the scrollbars to appear on top of the flexgrid. If I drag the scrollbar(0) control onto the flexgrid it does appear at runtime but any children I load at runtime fail to appear ... they do show up once their top and left properties move them out of the "shadow" of the flexgrid...

I have done this before with a textbox and had no trouble, I even revisited the code for that textbox and the only difference I see is the fact that in this case I am loading my controls at runtime from an indexed array  rather than moving the same control around my grid (in the case of the textbox which works fine).

Private Sub MSFlexGrid1_Click()
    Load VScroll1(VScroll1.Count)
    VScroll1(VScroll1.Count - 1).Visible = True
    VScroll1(VScroll1.Count - 1).Top = VScroll1(VScroll1.Count - 2).Top + VScroll1(VScroll1.Count - 2).Height

    'VScroll1(VScroll1.Count - 1).Left = MSFlexGrid1.CellLeft + MSFlexGrid1.Left
    'VScroll1(VScroll1.Count - 1).Width = MSFlexGrid1.CellWidth
    'VScroll1(VScroll1.Count - 1).Height = MSFlexGrid1.CellHeight
    'VScroll1(VScroll1.Count - 1).Top = MSFlexGrid1.CellTop + MSFlexGrid1.Top
End Sub
ASKER CERTIFIED SOLUTION
Avatar of Richie_Simonetti
Richie_Simonetti
Flag of Argentina image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mccainz2
mccainz2

ASKER

youre right richie.
I was trying to assign zorder as a variable rather than using it as a method call....
Problem fixed.
Glad to help. Thanks for "A" grade.