scroll

Swing JTable: Event when row is visible, or when scrolled to the bottom?

风格不统一 提交于 2020-01-02 04:07:07
问题 I'm looking for a way to be informed when a JTable has scrolled such that a particular row becomes visible, or failing that, when the bottom of the table has scrolled into view. Ideally this should be done without polling, but through some event firing. any ideas? 回答1: Add a ChangeListener to the viewport of the scrollpane. viewport = scrollpane.getViewport(); viewport.addChangeListener(this); then this checks the visible rows (can easily be extended to columns as well) public void

Sharing 1 scrollbar between two DataGrids

做~自己de王妃 提交于 2020-01-02 04:05:11
问题 I am making a wpf application that has 2 datagrids and I want them to scroll together. I know that the DataGridView class has a scroll event that you can use make the necessary changes to the other grid, but DataGrids don't have a Scroll event. I MUST use a DataGrid. This example is good but is not WPF and it's using DataGridView instead of DataGrid. Using one scroll bar to control two DataGridView What is the best way to have it so that one data grid's scroll bar also will move the data grid

Android: ScrollView in flipper

孤者浪人 提交于 2020-01-01 20:00:48
问题 I have a flipper: <?xml version="1.0" encoding="utf-8"?> <LinearLayout android:id="@+id/ParentLayout" xmlns:android="http://schemas.android.com/apk/res/android" style="@style/MainLayout" > <LinearLayout android:id="@+id/FlipperLayout" style="@style/FlipperLayout"> <ViewFlipper android:id="@+id/viewflipper" style="@style/ViewFlipper"> <!--adding views to ViewFlipper--> <include layout="@layout/home1" android:layout_gravity="center_horizontal" /> <include layout="@layout/home2" android:layout

Scroll bar for display table

血红的双手。 提交于 2020-01-01 19:39:14
问题 I was wondering how to insert a <DIV> tag in between the pagination bar and the actual TABLE that starts the results display if I have the pagination bar at the top. If I just put the <DIV> tag right before my display:table, it also includes the pagination stuff inside the scroll bar. Also, I cannot figure out how to set the style to TBODY as it is a little bit confusing. I am not sure if you guys wrote this stuff but can you advise me if you have any idea how to achieve this. and my code is

Disable UITextView scrolling the containing view?

馋奶兔 提交于 2020-01-01 19:14:41
问题 I've got a UITextView inside a UIScrollView (specifically, the text view is in a UITableViewCell in a table). When I type in the text view and hit return to make some new lines (and the text in the text view becomes too long for it to contain vertically), it scrolls both the text view itself (which is okay) and the table/table cell that contains it (which I would like to prevent) . Is there some way to prevent this behaviour? The UITableView has scrollEnabled set to NO, yet the UITextView

Iphone : How to scroll to the 1st cell of the 2nd section, letting the header of the 1st section visible

笑着哭i 提交于 2020-01-01 18:18:27
问题 I have an UITableView with rows and sections. I would like to scroll to the first item of the second section, letting the header of the first section visible. Like if I had manually scrolled the list until reaching that state. ---- TOP OF SCREEN ---- Header of first section Header of the second section cell 1 cell 2 cell 3 Header of the third section cell 1 cell 2 ... scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:1] does not do the job, it hides the header of the first

How to debounce or throttle scroll events in iOS devices ( Safari )

房东的猫 提交于 2020-01-01 15:06:07
问题 I`m trying to implement infinity scroll dropdown for mobile and desktop devices. Under "infinity scroll", I mean the following - if you have 100 records, when reach the end of the scrollable container, 20 new records will be loaded and the first 20 records will hide ( same for the backward direction ) I have encountered the following problems: Everything works perfectly in mobile Android Chrome browsers + desktop browsers except the Safari Mobile browser ( iPhone, iPad, etc.) I have tried the

How to disable page scrolling in FF with arrow keys

蹲街弑〆低调 提交于 2020-01-01 14:40:07
问题 I'm building a menu with topics and items. Each topic can be expanded and collapsed by clicking on it. My task is to make it possible to move through menu topics and items with the up and down arrow keys. I've done this already, but the problem is that when the page is bigger than the window, the page is scrolling when pressing the arrow keys. I've tried using: document.body.style.overflow = "hidden"; to stop the page from scrolling. Thus when I click on 'Topic2' for example I can continue

WPF ScrollViewer with ListBox

天大地大妈咪最大 提交于 2020-01-01 12:07:32
问题 Need your help. I have a ListBox (with virtualization ) which displays a ScrollViewer. My ListBox items are expandable, and while expanded their hight may exceed the visible scrolling area. The problem i'm expiriencing is that when the list box item is exceeds the visible scrolling area - scrolling jumps to the next ListBox item rather than simply scrolling the view. Check this code: <ListBox Grid.Row="1" Grid.Column="0" DataContext="{Binding SpecPackageSpecGroupListViewModel}"

How to scroll the UITableviewcell scroll up when the keyboard appears? [duplicate]

会有一股神秘感。 提交于 2020-01-01 10:06:10
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Table View scroll when text field begin editing iphone I have loaded many UITextFields in UITableview. Maximum i have 15 UITextFields in UITableView cells. I want to move(Scroll) up the the Cell when the Keyboard/UIActionSheet(UIPickerView) appears. Please suggest/guide me any sample code to solve this problem. Thanks in advance. 回答1: Please try below code in -textFieldShouldBeginEditing .... self.tblView.frame=