aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes Problem with row focus and scroll Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Problem with row focus and scroll" Watch "Problem with row focus and scroll" New topic
Author

Problem with row focus and scroll

Anusha Reddy
Greenhorn

Joined: Dec 11, 2008
Posts: 4
I have a table with a set of rows. And set color to the rows when up/down arrows are pressed. The scroll bar moves down when down arrow is pressed and moves up when up arrow is pressed.

But in my code, when i press down arrow on the last row, the focus should go to the first row. here to set focus i have just set colors to the corresponding rows. The problem is.. when i have more rows, when i try to scroll top from last row, focus is going to the first row, but as the scroll bar remains down, the first row is not visible. How can i move my scroll bar to the row focused?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15362
    
    6
Do you have code that figures out where the row is located on the page and than you use window.scrollTo() to move there?

Eric
Anusha Reddy
Greenhorn

Joined: Dec 11, 2008
Posts: 4
no i dont have
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with row focus and scroll
 
Similar Threads
Scrolling table by Arrow keys
Setting focus on a row, after refreshing the page
JTable and ScrollPane movement
getValueAt in JTable
JTree + JList in JScrollPane - Out of Sync