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. Image for the cookie policy date

override trackbarex left and right key behavior

I'm working with a trackbarex and would like to do my own behavior for when the left and right key are pressed when the trackbar has focus. I've tried doing the following:

System::Void tunercontrol::m_tbarTuner_KeyDown( System::Object^ sender, System::Windows::Forms::KeyEventArgs^ e )
{
if(e->KeyCode == Keys::Left)
{
e->Handled = true;
e->SuppressKeyPress = true;
// do my code
}
}

The problem is the value of the trackbar still changes. I don't want it to change here. Can this be accomplished without inheriting from trackbarex?


2 Replies

AB Adam Bruss January 6, 2011 02:30 PM UTC

Basically how can I avoid having the trackbar scroll or change value when pressing the left or right keys?



IM Iniyen M A Syncfusion Team January 7, 2011 02:01 PM UTC

Hi Adam,

Thanks for your interest in Syncfusion products.

The reported behavior is found to be an issue and has been fixed. Please create an incident undet out Direct –Trac support system if you wish to receive a patch for this fix.

Direct Trac link.

http://www.syncfusion.com/support/directtrac

I have attached a sample having an workaround for this issue in the following link
[Sample Link]

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=TrackBarExSample1896610211.zip

Please refer the sample and let us know if you have concerns on this.

Regards,
Iniyen M.A.



Loader.
Live Chat Icon For mobile
Up arrow icon