Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grid focus problem with VB 5.0

Status
Not open for further replies.

sdales

Programmer
Apr 23, 2003
3
ES
I'm using VB 5.0 and using a "grid" which I think is a tool from vb 4.0. I use a recursive function to search the grid and select those registers one by one which coincide with my search criteria, at which point a msgbox is used to either proceed to the next register or exit the search. The problem is that if the register is within the first 15 rows of the grid the cell is not highlighted on the screen. (15 rows being the number of rows on screen). once the grid has to scroll to show the register (for example: row 25) then the cell is highlighted with no problem. Is there a way to force the focus onto the cell? Is the problem that the msgbox has the focus? and if so why does this not affect all rows equally. I need some way to show on which row the search has paused even if the there are less than 15 registers in the grid.

I hope I've explained my problem ok! Any ideas on solution greatly appreciated. thanks in advance :)
 
Since the first 15 rows are already visible you may have to do a grid refresh or redraw , where this is naturally occurring when a matching register is found (more than 15 rows in the grid)and the gird has to be redrawn (refreshed0 for you to see it - only a guess.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top