[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 :confused:
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
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
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
Re: vertical trackbar (min value on top)
Thanks a lot jmcilhinney.
It works as I wanted it to work.