|
-
Aug 29th, 2011, 02:40 PM
#1
Thread Starter
Lively Member
[RESOLVED] vertical trackbar (min value on top)
Hi there all good people,
Please help me with this one as it drives me crazy.
I'm using a vertical trackbar. I got it all set: minimum and maximum values, tickfrequency etc... and so on... everything works great.
The only problem is that I would like to have the minimum value of the trackbar on the top.
In horizontal trackabar you can choose the RightToLeft property to put the minimum value to the left or to the right, but how do I make it to put the minimum value on the top if I have it in vertical orientation?
There has to be a way to somehow "flip" it... but how?
Please help 
EDIT:
here is a link to video on youtube, which show my problem.
I want it to be the other way round - from top to bottom:
http://www.youtube.com/watch?v=cnQTRbF2kWk
Last edited by marl; Aug 29th, 2011 at 03:40 PM.
Reason: added a youtube link
-
Aug 29th, 2011, 05:34 PM
#2
Re: vertical trackbar (min value on top)
You might be able to use a WPF slider control, and integrate it into your winforms application.
http://www.switchonthecode.com/tutor...pf-in-winforms
That is the very essence of human beings and our very unique capability to perform complex reasoning and actually use our perception to further our understanding of things. We like to solve problems. -Kleinma
Does your code in post #46 look like my code in #45? No, it doesn't. Therefore, wrong is how it looks. - jmcilhinney
-
Aug 30th, 2011, 12:08 AM
#3
Re: vertical trackbar (min value on top)
What does it really matter? The TrackBar doesn't actually display numbers anyway so just get and set the Value through a property that performs the appropriate transformation:
vb.net Code:
Public Property ActualValue() As Integer Get Return TrackBar1.Maximum - TrackBar1.Value + TrackBar1.Minimum End Get Set(ByVal value As Integer) TrackBar1.Value = TrackBar1.Maximum - value + TrackBar1.Minimum End Set End Property
Last edited by jmcilhinney; Aug 30th, 2011 at 12:14 AM.
Reason: Included Minimum to allow for non-zero Minimum value
-
Aug 30th, 2011, 05:39 AM
#4
Thread Starter
Lively Member
Re: vertical trackbar (min value on top)
Thanks a lot jmcilhinney.
It works as I wanted it to work.
Tags for this Thread
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
|