We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

TrackBarEx Control Events

Thread ID:

Created:

Updated:

Platform:

Replies:

69692 Nov 8,2007 04:08 AM Nov 9,2007 01:24 AM Windows Forms 1
loading
Tags: Tools
Rouslan Vorobiov
Asked On November 8, 2007 04:08 AM

Hi,
I'm using the TrackBarEx control in my application.I need to trap Scroll event of it but there is no such event.
There is ValueChaged event instead,but this event is not completely suitable for my needs.
Does anybody can advise me how do I solve the problem?

Thank' a lot!



Sri Subhashini M [Syncfusion]
Replied On November 9, 2007 01:24 AM

Hi,

I was able to view the condition you have described here. It is not directly possible.

We have a customized class of TrackBarEx that extends to have a ScrollEvent whenever MouseDown/KeyDown is dover over the THUMB.

public class CustomizedTrackBarEx : TrackBarEx
{
protected override void OnKeyDown(KeyEventArgs e)
{
base.OnKeyDown(e);
if (e.KeyData == Keys.Left)
{
RaiseOnScrollChangeEvent(this.Value);
}
}

protected override void OnMouseClick(MouseEventArgs e)
{
base.OnMouseClick(e);
RaiseOnScrollChangeEvent(this.Value);
}
}

Then, add the custom event with the TrackbarEx control,

// creating Custom event
this.trackBarEx1.ScrollChangedValueEvent += new TrackBarScrollEventHanlder(trackBarEx1_ScrollChangedValueEvent);
// Declaration of the custom event
void trackBarEx1_ScrollChangedValueEvent(TrackBarExScrollEventArgs sample)
{
this.trackBarEx1.ButtonColor = Color.FloralWhite;
}

Please take a look at the sample and let me know if it helps.

http://websamples.syncfusion.com/samples/Tools.Windows/TrackBarExSample/main.htm

Regards,
Suba.



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;