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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrolling in Grids

Status
Not open for further replies.

tbarone

Programmer
Aug 1, 2001
13
0
0
US
I am using Delphi 5. Everytime I use any type of a grid I cannot get the scrollbar on the grid to work right. I cannot seem to get it to work like a real scroll bar. When I move to the second record the bar moves to the middle and the bar stays in the middle until i get to the last record? Is there any code I can use to fix this or a property I need to set?

Thanks,
Tony
 
Also, It is not a regular scrollbar, it is a infoPower 3000 wwDBGrid
 
This is apparently a problem with delphi. We have had the same problem, and I was curious to see if the borland.public boards had an answer. It appears that twwdbgrid is a direct descendant of delphi's tdbgrid (as expected), and that delphi's tdbgrid works that way on purpose. According to the posts on the borland boards, some dataset types do not include a recordcount property, and it can be expensive (performance-wise) to constantly retrieve it. I don't buy this entirely, since you would think it would work fine if the dataset has a recordcount (in BDE or ADO type operations).

Our initial attempt to solve this problem was to drop a TScrollbar on top of the grid scroll bar and control that, but it was a pretty time-consuming problem to handle all the possible user operations, and we gave up. We just provide our users with the poor quaility scroll bar that we get with infopower.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top