Solved

Problem placing scrollbar controls in flexgrid cells

Posted on 2003-11-14
3
422 Views
Last Modified: 2010-05-01
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
0
Comment
Question by:mccainz2
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 250 total points
ID: 9750463
did you try with zorder property?
I didn't use scrollbars controls but if they have hwnd property you should place them over other controls/windows.
0
 
LVL 5

Author Comment

by:mccainz2
ID: 9750610
youre right richie.
I was trying to assign zorder as a variable rather than using it as a method call....
Problem fixed.
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 9750665
Glad to help. Thanks for "A" grade.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now