Here is my issue: Let's say there are 50 rows and the size of the grid
displays 10 of them. The user can use the scroll bars to scroll no problem.
But, there are times where I need to automatically position which row is
selected based on something the user does. When they perform their action, I
do:
Tquery.DisableControls;
CurrPos := Tquery.GetBookmark;
If not Locate(<value>, <field>, []) then
Tquery.GotoBookmark(CurrPos);
Tquery.EnableControls;
When I do this, it goes where I want it, but the selected row seems to jump
all around. Sometimes it is the first, others somewhere in the middle and
other times at the bottom. And there is no rhyme or reason to it and it just
seems to jump around. If I do this several times in a row quickly, it looks
like something is wrong.
What I would love to do is have the highlighted/selected row be say the
fourth row and have the data behind it move but not the selected row to give
a more consistent look to the user. Is this possible?
Thanks!
Scott
Well I do not thing that it is unexplainable how this work. The rule of
thumb is simple. IF the record your are looking is bellow the current
view then it will be the last raw on the view after selected, if it
above it will be the first. It is possible to be in the middle if it is
already in view. You can have a consistent effect if you move to the
first record before using locate, I do not know if this is what you are
after though.
regards
Yannis.
--
Do, or do not. There is no 'try'.
- Yoda ('The Empire Strikes Back')