Print Page | Close Window

Problem disabling CXTPControlEdit

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=9870
Printed Date: 01 March 2025 at 9:01am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problem disabling CXTPControlEdit
Posted By: flashk
Subject: Problem disabling CXTPControlEdit
Date Posted: 12 March 2008 at 12:35pm
Hi,

My application adds an edit control with spin buttons to one of its command bars. Here is the code:
CXTPControlEdit edit = (CXTPControlEdit*)pToolBarMarkers->GetControls()->Add(xtpControlEdit, ID_MARKER_COUNT);
edit->ShowSpinButtons(TRUE);

I also implement an ON_UPDATE_COMMAND_UI handler for the edit control, so I can disable it in certain cases. When the edit control is disable everything is grayed out and looks disabled, however I can still click on the spin buttons and change the value.

Is there any workaround for this?



Replies:
Posted By: Oleg
Date Posted: 13 March 2008 at 10:55am
Hi,
Thanks, it indeed have to be fixed in our sources. Please patch them now - in CXTPControlEdit::OnClick method add
 
else if (!bKeyboard && GetSpinButtonsRect().PtInRect(pt) && GetEnabled())
 
Changed for 12.0 release.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: flashk
Date Posted: 13 March 2008 at 8:40pm
Thanks! It works perfectly now.



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