autoscroll

JScrollPane and JList auto scroll

*爱你&永不变心* 提交于 2019-11-29 03:36:01
I've got the next code: listModel = new DefaultListModel(); listModel.addElement(dateFormat.format(new Date()) + ": Msg1"); messageList = new JList(listModel); messageList.setLayoutOrientation(JList.VERTICAL); messageScrollList = new JScrollPane(messageList); messageScrollList.setPreferredSize(new Dimension(500, 200)); messageScrollList.getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { e.getAdjustable().setValue(e.getAdjustable().getMaximum()); } }); It auto scrolls down. But, if I try to scroll back up to re-read a

Infinite Auto Scroll ListView with Scroll Speed Controlled

痞子三分冷 提交于 2019-11-28 21:21:34
问题 I have been working on a ListView idea where it keeps scrolling automatically with no user interaction and that is absolutely doable using the android APIs for instance smoothScrollToPositionFromTop . I have implemented ListView BaseAdapter where it load items forever (almost) to get a non stopping self repeated ListView . What I want to achieve here is to keep my ListView scrolling forever with certain speed (slow) to make items clear and readable while scrolling down, I not sure yet if

Multiline Textbox with automatic vertical scroll

心不动则不痛 提交于 2019-11-28 21:03:30
There are a lot of similiar questions over internet, on SO included, but proposed solutions doesn't work in my case. Scenario : there is a log textbox in xaml <TextBox Name="Status" Margin="5" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Left" VerticalAlignment="Top" Width="600" Height="310"/> There are methods in code-behind that do some work and add some multiline (maybe that's the problem?) messages into this textbox: private static void DoSomeThings(TextBox textBox) { // do work textBox.AppendText("Work finished\r\n"); // better way than Text += according to msdn // do more textBox

smooth auto scroll by using javascript

六月ゝ 毕业季﹏ 提交于 2019-11-27 21:35:25
I am trying to implement some code on my web page to auto-scroll after loading the page. I used a Javascript function to perform auto-scrolling, and I called my function when the page loads, but the page is still not scrolling smoothly! Is there any way to auto scroll my page smoothly? Here is my Javascript function: function pageScroll() { window.scrollBy(0,50); // horizontal and vertical scroll increments scrolldelay = setTimeout('pageScroll()',100); // scrolls every 100 milliseconds } It's not smooth because you've got the scroll incrementing by 50 every 100 milliseconds. change this and

jCarousel - how to get pause on hover with autoscroll?

我与影子孤独终老i 提交于 2019-11-27 18:08:54
问题 JCarousel have recently changed (january 2011). It used to have a way to implement pause on hover with autoscroll. With the new version I cannot solve how to get autoscroll to stop on hover: I would like the scroll to stop on mouseover and start again on mouseout. Any suggestions? Example code is here - http://testsite3.dk/jcarousel/ Jcarousel here: github.com/jsor/jcarousel Link to JQuery + javascript to load thumbs here - http://testsite3.dk/jcarousel/autoscroll.txt 回答1: add this code into

JScrollPane and JList auto scroll

a 夏天 提交于 2019-11-27 17:41:19
问题 I've got the next code: listModel = new DefaultListModel(); listModel.addElement(dateFormat.format(new Date()) + ": Msg1"); messageList = new JList(listModel); messageList.setLayoutOrientation(JList.VERTICAL); messageScrollList = new JScrollPane(messageList); messageScrollList.setPreferredSize(new Dimension(500, 200)); messageScrollList.getVerticalScrollBar().addAdjustmentListener(new AdjustmentListener() { public void adjustmentValueChanged(AdjustmentEvent e) { e.getAdjustable().setValue(e

Multiline Textbox with automatic vertical scroll

孤街浪徒 提交于 2019-11-27 13:26:16
问题 There are a lot of similiar questions over internet, on SO included, but proposed solutions doesn't work in my case. Scenario : there is a log textbox in xaml <TextBox Name="Status" Margin="5" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Left" VerticalAlignment="Top" Width="600" Height="310"/> There are methods in code-behind that do some work and add some multiline (maybe that's the problem?) messages into this textbox: private static void DoSomeThings(TextBox textBox) { // do work

Auto scrolling to a cell with a specific value

大城市里の小女人 提交于 2019-11-27 13:05:55
问题 I have a list of numbers in a table view like this. As you can see the numbers are repeated. Let's consider a set of repeated numbers as a group . So there are group of 1s, group of 2s and so on. What I want to do is when the app starts, I need to scroll to the start position of a specified group automatically. Before explaining further, here is my code so far. import UIKit class TableViewController: UITableViewController, UITableViewDataSource, UITableViewDelegate { private var scrollToTime

Stop ScrollView from auto-scrolling to an EditText

戏子无情 提交于 2019-11-27 06:37:25
Seems to be a common problem without a great solution that I have found. Goal is to stop a ScrollView from auto-scrolling to an EditText (or any view for that matter) that has focus. You have a bunch of views ( Button s, TextView s, etc) in an ScrollView , one of which is an EditText . Upon clicking say a Button within the ScrollView , the ScrollView scrolls down to the EditText (its off screen). This is not desired, as there are other elements that you don't want scrolled off the screen. Now I can stop this from happening when the screen first shows by having other focusable elements in the