?
Solved

FlexGrid and TreeView, Force scrolling to show selected item

Posted on 2003-03-30
2
Medium Priority
?
286 Views
Last Modified: 2006-11-17
In both a tree view control and a flexgrid control I want to cross reference nodes and rows, I can programmatically locate the corresponding cross reference between the two views of my data BUT I cannot ‘force’ the 'other' control to scroll up/down so that the cross referenced entry is visible to the user. Any ideas.
0
Comment
Question by:nvms
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
Jzaltheral earned 200 total points
ID: 8234701
Well, I don't know anything about the FlexGrid control as I have never had to use one, but I can help you out with the TreeView.

To select an item in the TreeView control and force the control to go where that item is, use the following code:

Set TreeView1.SelectedItem = TreeView1.Nodes.Item(Index)
TreeView1.SetFocus

Good luck.

Jzal
0
 

Author Comment

by:nvms
ID: 8236139
To easy : )   I didn't realise that SelectedItem was a writeable property, very cool.

I also solved the MSFlexGrid problem with this:
If .RowIsVisible(X) = False Then
  ' Force view !
  .TopRow = .Row
End If

Also very simple,

Thanks again

Stewart
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses
Course of the Month8 days, 12 hours left to enroll

765 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