Print Page | Close Window

Handling Spinner control on ribbon bar.

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=13001
Printed Date: 28 February 2025 at 11:36am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Handling Spinner control on ribbon bar.
Posted By: Satyen
Subject: Handling Spinner control on ribbon bar.
Date Posted: 22 December 2008 at 9:28am
I want to implement a spinner control on ribbon bar.
I am using ‘CXTPControlEdit’ as my control class. I am able add the control and handle its event using following NotifySpinChanged function.

 

But I am not able to fire event when mouse wheel is rotated. I.e. changing spin value using mouse scroll. (This functionality is not implemented in Microsoft word also).

 

My class is as follows -

 

// Combo box class for Font list.

class JTranslucencyCtrl: public CXTPControlEdit

{

public:

   

      virtual CString GetSelecteFont()

    {

            return GetEditText();

    }

 

      virtual void NotifySpinChanged(int incr, int dir)

      {

            CString strSelection =  GetEditText();

 

            CXTPControlEdit::NotifySpinChanged(incr, dir);

      }

 

      DECLARE_XTP_CONTROL(JTranslucencyCtrl);

};

 

Please let me know, how to handle scroll events

 
 


-------------
Thanks & Regards,
Satyenjit Bagal.
Software Development Engineer.
SIEMENS Automation and Drives.



Replies:
Posted By: ColtSeavers
Date Posted: 22 December 2008 at 4:10pm
I found a similar issue when using a slider control.  The only way I found was to use the CN_UPDATE_COMMAND_UI (OnUpdate...) handler and check for changes in the control's position.  I haven't decided whether to leave this in the program for the released version or try and find a better way to handle this.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net