| View previous topic :: View next topic |
| Author |
Message |
chucks0 Newbie
Joined: 08 Jun 2002 Posts: 23
|
Posted: Fri Jun 14, 2002 8:09 pm Post subject: Scrolling list box. |
|
|
I have created a dialog with a list box for displaying realtime status information. The problem is that as I add items to the list box, they eventually go off the bottom of the list. While there is a scroll bar on the list box, I would like for the list to scroll along with the items so that the most recent entries are always visible.
Any thoughts? |
|
| Back to top |
|
 |
chucks0 Newbie
Joined: 08 Jun 2002 Posts: 23
|
Posted: Fri Jun 14, 2002 8:32 pm Post subject: RE: Scrolling list box. |
|
|
I found a solution for this. I added the subroutine which I call evertime I update the list box. It basically selects the last item in the list which causes the list box to scroll to the last item. The @NEXT statement was added because I don't want any of the items in the list to be selected.
:SUB_AutoScroll
LIST SEEK,lstStatus,@PRED(@COUNT(lstStatus))
%T = @NEXT(lstStatus)
EXIT |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Mon Jun 24, 2002 8:46 pm Post subject: |
|
|
You can scroll a list box to the last line using @sendmsg too.
%E = @sendmsg(~LIST1,$0197,@pred(@count(LIST1)),0)
Jules[/quote] |
|
| Back to top |
|
 |
Protected Valued Contributor


Joined: 02 Jan 2001 Posts: 228 Location: Portugal
|
Posted: Tue Jun 25, 2002 3:39 pm Post subject: |
|
|
I also had the same problem a long time ago, and it was so easy to do it with that list seek  |
|
| Back to top |
|
 |
|