Setting focus to the last row in a browse

Posted by Admin on 02-Dec-2008 07:57

Well, here I am again, with another browse-question. My question this time is: how do I manually set focus to the last row (in a query) in a browse, e.g. after a refresh?

All Replies

Posted by Håvard Danielsen on 02-Dec-2008 12:48

Some suggestions:

1. run fetchLast in hSDO.

2. run dataAvailable in hBrowser ("last").

3. h = DYNAMIC-FUNCTION("getBrowseHandle" in hBrowser).

apply "END" to h. ( apply CTRL-END if focus is in column)

The hSDO is the SDO instance procedure handle and hBrowse is the browse instance procedure handle.

It is possible that you need to run applyEntry (as you explained in your previous post) in addition to ensure that focus really is in the browse.

Posted by Admin on 04-Dec-2008 01:22

OK, thank you.

We found out that the problem was another: the browse in question was set to multiselect, which caused some errors, but I'll keep your code in mind the next time I need to do something like this.

This thread is closed