scrolling

[WPF] Calculating number of visible items in ListBox

I have a class called Book; class Book { public string Name { get; set; } public string Author { get; set; } public int PagesCount { get; set; } public int Category { get; set; } } The ListBox displays a list of Books and the ItemTemplate has been modified so as to visually represent the Book. The text shows the book's Name, autho...

TableLayoutPanel Controls - Lock Column from Horizontal Scroll?

I'm using a TableLayoutPanel in a Windows Forms application to organize a set of controls in a grid-like fashion. I'd like to lock the TableLayoutPanel's first controls column so that it remains fixed when the user applies the horizontal scrollbar. Any guidance is appreciated. ...

How to scroll the window using JQuery $.scrollTo() function

Hi, I'm trying to scroll down 100px every time the user gets near the top of the document. I have the function executing when the user gets close to the top of the document, but the .scrollTo function isn't working. I put an alert after and before to check to see if it actually was the line or not that was stopping it and only the fir...

Large fields on ScrolledComposite results in too much scrolling

I have a ScrolledComposite which is a bit like an spreadsheet. It works mostly without problems, but I sometimes have a large field that fills almost an entire row (the rightmost part). When focus is on this field, and setShowFocusedControl(true) has been called, swt insists on showing the rightmost part of the field, which has the sam...

Scrolling to the previous div in jQuery

I'm using the scrollTo plugin for jQuery on a website. I made a vertical scrolling div wher I can scroll to different div by clicking on buttons. And now I need to make a back button to return to the previous div. what I want is the opposite of this.next() I tried this.prev() but it doesn't work. $('#tabs').click ( function(...

wxPython: Drawing inside a ScrolledPanel

I'm using a PaintDC to draw inside a ScrolledPanel. However, when I run the program, the scroll bars have no effect. They're the right size, but the picture doesn't move when you scroll with them. I figured I may have to convert from logical to device coordinates. I tried x=dc.LogicalToDeviceX(x) and y=dc.LogicalToDeviceY(y), but there ...

WPF Memory Usage #2

I've asked a question about my memory management problem in WPF, but this is a different one about the same problem. I am using DotTrace trying to figure out what's going on. When I start up my app, I can see in Task Manager that it is taking 200MB. DotTrace says a total of 33MB. If I simply minimize the window and bring it back up, the ...

How Do You change A ScrolledComposite's Horizontal Scroll Increment?

I have an application that displays a ScrolledComposite. Users are complaining that the horizontal scrolling increment is too fine, i.e. each click on the horizontal scroll arrow currently moves the bar one pixel at a time. They want individual clicks to cause greater horizontal movement. Could someone explain how I could implement th...

How to smoothly scroll SWT composite?

I'm using a SWT ScrolledComposite but when I scroll in Windows I get some tearing / flickering if I scroll to fast. What can I do to double buffer or reduce this effect, or what can I do to override the default scrolling functionality and make it scroll more smoothly? There's text boxes in the scrolling area so I don't think a canvas wou...

How to scroll to show a part of a webpage

What are the different ways you can control/read the Scrollbar in a web browser with JavaScript, apart from anchors? -- Unless you can dynamically create anchors and tell the browser to scroll down to that. ...

How can I determine if a div is scrolled to the bottom?

How do I determine, without using jQuery or any other JavaScript library, if a div with a vertical scrollbar is scrolled all the way to the bottom? My question is not how to scroll to the bottom. I know how to do that. I want to determine if the the div is scrolled to the bottom already. This does not work: if (objDiv.scrollTop == obj...

Scroll 2 panels at the same time

I have windows forms (.net 2.0) control that contains a splicontainer inside. Splitcontainer, as usually, contains 2 panels (standard thing). The Autoscroll is set to true. I've been struggling for quite a time to achieve something like synchronizing those two panels, so scrolling one of these will scroll the second one also. I achieved...

How do I fix the cursor to the middle of the screen in Emacs, so that the page moves, not the cursor?

I'd like to fix the cursor to the centre line of the screen, so that when I press Ctrl-N or Ctrl-P, the page itself moves up or down, and the cursor stays still. Has anyone got any tips on how to achieve this? Thanks Ed ...

How do I scroll a RichTextBox to the bottom?

I need to be able to scroll a RichTextBox to the bottom, even when I am not appending text. I know I can append text, and then use that to set the selection start. However I want to ensure it is at the bottom for visual reasons, so I am not adding any text. ...

How do I automatically scroll to the bottom of a multiline text box?

I have a textbox with the .Multiline property set to true. At regular intervals, I am adding new lines of text to it. I would like the textbox to automatically scroll to the bottom-most entry (the newest one) whenever a new line is added. How do I accomplish this? ...

How does the WPF ComboBox disable the window from scrolling or resizing

I am trying to recreate some of the behaviors that occur when the combobox dropdown is open. When this happens, if there is a scrollviewer then scrolling gets ignored. The ability to resize the window is disable. I know that there is a ResizeMode, but the results of changing the mode are visibly jarring to the window. If the window goes ...

Does anyone have a good way to scroll text off to one side, like a stock ticker in a label on a nib in an iphone app?

I want to scroll text starting on the right and make it smoothly move to the left and off the screen. Does anyone have an example of something they tried that worked? Thank You. ...

ScrollHeight not updating in IE8 using JQuery

I am trying to append some text (divs) to a scrollable div and then automatically scroll the the bottom. For some reason, when I try to do this in IE8, it is not working. Uncommenting the 'alert' lines show that IE8 returns two values for the ScrollHeight attribute. Does Jquery appends run asynchronously or does the DOM take time to r...

How can I make the window scroll by using mouse position?

Hi, If I want to use the mouse to scroll the window when it gets close to one of the edges how can I approach this? So far I have it working fine, it checks the position whenever it moves to see if it is close enough to the edge to scroll. However, it only checks the position whenever the mouse moves, so if you moved close the edge, i...

WPF Drag-to-scroll doesn't work correctly.

Hi all, I am tying to realize a drag-to-scroll functionality in my application and have problems on my way. Can anybody help me? I have a ScrollViewer and inside it an ItemsControl and within ItemsTemplate I have a UserControl. I want to drag that UserControl within ItemsControl. I want the ScrollViewer to scroll down, when I am dragging...