Reposition

Yohn

Member
Hi,
I have next situation:
I have button that opens searching browse with 2 columns. On that brows I have variable what. when I start typing letters It must scroll trough the column depending what letter or set of letters I enter. For example when I start typing mus it must find first record that matches first three letters in table, and mark that row in browser.

thx.
 

GregTomkins

Active Member
This is probably possible by capturing the VALUE-CHANGED event in the field and using it to reposition the current row in the browse. Warning though, I find the repositioning methods of the PSC browse confusing, incomplete, and poorly documented. Every time I seriously work on it, I reconsider switching to a third party grid control. However, most of them aren't much better. It's just a difficult issue all around, I suppose.
 

LarryD

Active Member
Try this....

in a trigger assuming browse browsename is enabled...

on any-printable of browse browsename do:
pressed-keys = pressed-keys + keylabel(lastkey).
if length(pressed-keys) <> 3
then return no-apply.
find first tablename where tablename.data begins pressed-keys no-error.
if available tablename ... reposition,set row, etc
... more stuff....
pressed-keys = "".
end.

That should get you started.
 
Top