Locating clicks in the Scrollbars
I'm programming an app in C++Builder, and I'd like to detect when an user clicks into a vertical scrollbar, the relative position inside the scrollbar.
I mean the following:
I'm programming a Log viewer, based in a a TStringgrid component. As I get all the data from a remote server, it can't take the entire log and then displays it (the log may has a size of Mb). So I need to display only some lines each time.
Well, the way I want to do that is first, knowing the number of lines that the log has, say for example 1000. I assign them to the TStringgrid component as rowcount. Then, I want to detect if the user clicks in the middle of the scrollbar, so the user may want 10 lines below, and 10 lines above the line number 500. Then I take those lines from the server and that's it. But I need to know how to detect the position of the Scrollbar click, And of course how to make it relative to the number of lines.
Thanks and regards,
P.S. If there are somewhere a log viewer component, it could be interesting too.