Thanks. This is my implementation of your suggestion. It seems that
the default rowheight of a listbox is 16, so I set defaultrowheight
to 16. I set numRowsInListbox to listbox.height/rowheight. In he code
below, "RowNumberOfStructure" is the selected row number; it works
nicely:
if RowNumberOfStructure<listbox1.ScrollPosition then
listbox1.ScrollPosition=RowNumberOfStructure
end if
if RowNumberOfStructure>=listbox1.ScrollPosition
+NumRowsInListbox then
listbox1.ScrollPosition=1+RowNumberOfStructure-NumRowsInListbox
end if
John
On Aug 24, 2006, at 11:47 AM, [EMAIL PROTECTED] wrote:
Check ScrollPostion first.. If the row is less than scrollposition
it is off the top...
Off the bottom is tougher... I set DefautRowHeight so I know what
it is and then se that and ScrollPoistion do the math to determine
what the index of the last visible row is... (You have to assume
aaheader height if you are using headers... I use 20 for that IIRC)
- karen
-------------- Original message --------------
From: John Kubie <[EMAIL PROTECTED]>
In a listbox, how can you tell if a row is visible, and not scrolled
off of the screen?
John Kubie
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>