-
December 17th, 2008, 10:52 AM
#1
Reverse Scrollbar
Is it possible to have an horizontal scrollbar act as a vertical scrollbar.
I have a panel with a HScrollbar at the bottom of it.
I would like to slide the scrollbar from left to right and have the content of the panel move up or down.
Thank you,
Pierre
-
December 17th, 2008, 11:06 AM
#2
Re: Reverse Scrollbar
You can do this easily with a composite control, but it would be difficult to "re-wire" the existing functionallity.
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
June 23rd, 2011, 02:36 AM
#3
Re: Reverse Scrollbar
Hi pierrewhy,
it can be easily achieved with layout transform in WPF.
I wanted to create a NumericUpDown control that would increase the number in a textbox when scroll up is pressed and decrease when scroll down is pressed. To achieve that I used:
<ScrollBar Name="scrollBar" Grid.Column="1"
Value="{Binding Path=Text, ElementName=textBox}"
Maximum="{Binding MaxValue}"
Minimum="{Binding MinValue}"
LargeChange="{Binding Change}"
SmallChange="{Binding Change}">
<ScrollBar.LayoutTransform>
<RotateTransform Angle="180" />
</ScrollBar.LayoutTransform>
</ScrollBar>
The most important for you is the LayoutTransform part.
I know you probably do not need it, but there are others who might.
Cheers,
Michal.
-
June 23rd, 2011, 05:07 AM
#4
Re: Reverse Scrollbar
Michal,
For WPF that is indeed a good solution. When the question was posted about 3 years ago, the presumption was that it was WinForms....
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
June 23rd, 2011, 05:45 AM
#5
Re: Reverse Scrollbar
That is correct. I just wanted to update the topic for people like me who look for such information now .
-
June 23rd, 2011, 05:53 AM
#6
Re: Reverse Scrollbar
Just remember there is a DIFFERENT forum here for WPF....
http://www.codeguru.com/forum/forumdisplay.php?f=99
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
June 23rd, 2011, 06:38 AM
#7
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|