In some programs, for example, Microsoft Office Excel, when you’re at the end of the document being edited and then press a right or down arrow of the scrollbars, then, you scroll further and the edited area will grow, producing more space for entering data. Can this functionality be implemented in WPF?
I tried using ScrollBar instead of ScrollView to get more control, but didn’t succeed. If the scroll bar is at its maximum value, pressing the right or down (depending on the orientation) button of it doesn’t fire the scroll event.
Related
I have a list and its scroll bar on the right along with two custom buttons representing upscroll and downscroll. These two buttons simulate scrolling by using list.setSelectedIndex(index, true) and are placed above and below my scrollbar via my custom layout.
I have two questions regarding this:
1). Since the upscroll and downscroll buttons are overlayed on top of the list, they disappear when i click elsewhere..and they kind of flash into appearance when i click the area it's supposed to be in. How can I remedy this behavior?
2). I have a scrollbar image that I have used in the "Scroll" theme in the GUI builder. It's alignment is IMAGE_ALIGNED_CENTER. However the scroll thumb doesn't reach the end of the bar when i scroll to the end of the list via my upscroll and downscroll buttons. The upscroll and downscroll buttons essentially scroll the list by one index with each press (using setSelectedIndex(index, true)).
Thanks
How do you overlay the buttons. I'm assuming you just set them into a specific location which disallowed as we can't possibly adapt them to the various resolutions. I suggest reading the developer guide section on layouts very carefully.
To place something on top of the list in a portable way you need to use the LayeredLayout or the LayeredPane and a Container + correct layout to position this within (e.g. BorderLayout EAST).
In this blog post there is a sample for making a scrollbar but it isn't "on top". It can be used as a starting point.
I want my WPF application to have a ToggleButton that contains an image of the mouse pointer in it. The idea is that the user will choose one of three different cursors (the normal mouse cursor, the hand cursor, and a "zoom" cursor) by clicking on a ToggleButton. I want the cursor image to show on the ToggleButton.
How do I get these icons onto my button?
Tony
If there are only three options, why don't you search for three images, and check the mouse around the, say, 30 secs and adjust the button, if needed.
pretty weird issue, essentially not replicable with certainty. Several offending buttons are located on top of a tab control's header (not as a tab page child, they are child to the same surface that tab control is child to) in upper right corner, to the right of the righmost page header button. Usually they are fine, but sometimes all these buttons are only visible as button shapes without text. But when I move mouse to them to click, with the mouse over them the text becomes and stays visible.
To be clear, the buttons are always visible and so are certainly "on top of" the tab control in the z order.
What gives?
We have already seen this issue and it is registered in the support center at:
SimpleButton's Text is not visible
We will research why the problem appears and fix it.
I have a navigation panel in the left hand side of my WPF application. I want to make a button (like in photoshop or a similar program) when you push it, it expands across the bounds and "on top" of the other controls (the center column) - and allowing the user to push a button. Just like in the ribbon bar.
Does it make sense?
You should try Avalon Dock : http://avalondock.codeplex.com/ It gives you exactly what you want.
I've got a Silverlight user control that contains a datagrid. The datagrid is bound to an ObservableCollection. The user control is displayed in a popup window that I show in response to some event in another control
There are about 80 objects in the collection, and I've set a fixed height of 400 on the datagrid, so only about 20 items can be shown at one time, and the vertical scrollbar should be shown, with a thumb size occupying about 1/4th of the control height.
However, what's actually happening is that the scrollbar occupies almost the whole control height; maybe 95% of it. The datagrid displays the first 20 items. When I click on the scrollbar down arrow, the scrollbar moves down a little to occupy the bottom 95% of the scroll area, and the datagrid displays the last 20 items.
It gets weirder. If I move over the items in the grid and scroll down using the mouse wheel, then the items scroll correctly and I can view the whole list, although the scrollbar remains the same size.
And then, if I close the popup and reopen it, the scrollbar now appears with the correct height and it works correctly.
Finally, if I just show the control directly on the page, and not in a popup, it works fine.
What's going on here?! Has anyone else run into this problem? Help!
Update: The problem seems to be the way that I'm showing the popup. For various reasons, I had to implement the popup display in a somewhat tricky way, and it's this that's causing the trouble.
I recoded this, removing some crufty stuff, and the problem went away; see my update. This isn't really a solution as such, but I wanted to close out the question for the record.