|
This works great, however could this be changed to be scrollable? I have many frames and i changed it so it loads multiple thumbs with bitmaps attached and there's not much room to fit as the trackbar is limited to showing all the frames from start to end. Any help would be really appreciated, and thanks for the awesome control!
|
|
|
|
|
I use this on my own projects.
|
|
|
|
|
In VS 2017, I built the test app, and all sliders draw OK in horiz orientation. I set the 'Custom thumb examples' sliders to vertical, and all the thumb drawings are messed up. Don't understand why there are no comments about this already. Am I missing something?
|
|
|
|
|
Thanks for this project, it was exactly what I needed for my project.
|
|
|
|
|
Liked your slider and am using it. Have some suggestions.
Instead on OnKeyUp, use OnKeyDown. That way, if the user holds down the arrow keys or page up/down, the slider will continue to move. Also, ScrollEventArgs has a property called OldValue, which currently isn't being populated. It would be nice to add that. Thanks again!
Don Thomas
|
|
|
|
|
I was looking for a good slider replacement and found yours. It works really great, thanks ! I do have a little question: playing around with the custom thumb shape, i noticed that it is always drawn from a fixed point. For example: you cannot create a thumb that has the height of the trackbar without it shifting to the top of the controls bounds. I found that the problem has something to do with the line :
m.Translate(thumbRect.Left - thumbPath.GetBounds().Left, thumbRect.Top - thumbPath.GetBounds().Top); If i offset the thumRect.top a bit, the offset from the top changes. Do you have any ideas on how the code should be altered to avoid drawing from zero ??
Best regards, ub
|
|
|
|
|
Anyone managed to reverse the slider on vertical orientation? Max value should be up and min value at bottom. Just 180 degree around.
Thank you.
|
|
|
|
|
first and foremost great control worked right off the bat..I just have a quick question is there a way to use an image as the thumb pen you know the one that is clicked and moved back and forth? If it's not too much to ask if you could show me if it's possible I would greatly appreciate it! Great job though let me just say that again
|
|
|
|
|
Great control. A bit more commenting would be helpful for those new to C# but overall very high quality
|
|
|
|
|
Hi,
My vote is 5.
I have application that I supply to client.
What are the reuse conditions of this code?
I am not a lawyer so I do not understand the license document
Sorry
Noam
|
|
|
|
|
Hi
Great control, but I have a slight problem when I put several into a Panel container which has a scrollbar. It looks like the panel takes priority of the mouse wheel so that the panel scrolls instead of the trackbar. Once the panel slider has reached the end of its travel, it then moves the trackbar.
Is there a way of reversing the wheel scrolling priority so that the trackbar moves before the Panel does?
|
|
|
|
|
I've managed to solve it
adding ((HandledMouseEventArgs)e).Handled = true; at the end of OnMouseWheel() stopped the message getting back to the panel
|
|
|
|
|
Very nice, still some morons voted it 2 or 3.
5 from me. Thanks for share.
|
|
|
|
|
great performace. seems like what I needed, except I have no idea how to change the trackbar thumb to the image that I have stored in the .png file/project resources... for me it is a must, since it should indicate volume...any ideas? the code in the example seem drawing it by itself based on some math functions...
|
|
|
|
|
Thanks for this good implementation.
I did small change in order to allow fully hide the border. In following case in mouse over event, I found that transparent border appeared because was lightened.
Here is my fix for myself
public static Color[] LightenColors(params Color[] colorsToLighten)
{
Color[] colorsToReturn = new Color[colorsToLighten.Length];
for (int i = 0; i < colorsToLighten.Length; i++)
{
if(colorsToLighten[i]==Color.FromKnownColor(KnownColor.Transparent))
colorsToReturn[i] = colorsToLighten[i];
else
colorsToReturn[i] = ControlPaint.Light(colorsToLighten[i]);
}
return colorsToReturn;
}
|
|
|
|
|
if(colorsToLighten[i] == Colors.Transparent))
or
if(colorsToLighten[i].A == 0))
you don't need to make it complicated
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
when setting the orientation of the control to vertical, the max value is at the bottom instead of at the top. it's just 180() to what you would expect a normal slider control to be set to in a vertical environment. I am not a great C# coder so can you point me in the right direction to where i can fix this?
thanks! and Awesome control by the way.
|
|
|
|
|
yeah I need this also.
Though a hack you can do is (100 - colorSlider.Value)
modified on Saturday, March 7, 2009 9:09 PM
|
|
|
|
|
If anyone is using a negative integer as a minimum value, all I did is to use (value = 0 - colorslider.Value)
This switches the maximum and minimum values on the control.
|
|
|
|
|
At this point changing that would not be trivial. So it is best to hack it so that instead of using Value property you use (Maximum-Value)
Michał Bryłka
Theory is when you know something, but it doesn't work.
Practice is when something works, but you don't know why.
Programmers combine theory and practice: Nothing works and they don't know why.
|
|
|
|
|
I added the HideOuterRegion property to extend the inner area for the whole control.
In DrawColorSlider method, I check if this property is true and if yes, I don't inflate the barRect in every orientation.
Thanks for great article!
Issahar
|
|
|
|
|
you're welcome
Michał Bryłka
Theory is when you know something, but it doesn't work.
Practice is when something works, but you don't know why.
Programmers combine theory and practice: Nothing works and they don't know why.
|
|
|
|
|
Really great job! Love it, this is one control that really lacks in win forms!
Cheers!
|
|
|
|
|
Thanx
Michał Bryłka
Theory is when you know something, but it doesn't work.
Practice is when something works, but you don't know why.
Programmers combine theory and practice: Nothing works and they don't know why.
|
|
|
|
|
Hi Michal, this is absolutely brilliant and exactly what I was looking for!! Well done! My application is in VB. Could I just place the dll in my solution and reference it or would I need a VB version of the component class?
I tried converting but there are numerous errors!
|
|
|
|