Print Page | Close Window

slitbutton popup problem

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=648
Printed Date: 11 December 2024 at 11:35pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: slitbutton popup problem
Posted By: jerry2000
Subject: slitbutton popup problem
Date Posted: 22 April 2004 at 9:23am

In the topic "Reponding to a xtpControlSplitButtonPopup"

https://forum.codejock.com/forum_posts.asp?TID=621&KW=split+button - https://forum.codejock.com/forum_posts.asp?TID=621&K W=split+button

SuperMario has written:

When you click on an arrow of a popup like the splitbutton popup or the combobox the InitCommandsPopup event is fired.  The Execute event is fired only when you click on the button part of the splitbutton popup or one of the controls displayed in the dropdown.  You would then add the required controls to be displayed in the dropdown.  Look at the Dynamic Popups sample to see how to use this event.

I want to have the same behavior if the user presses the button part or if he press the arrow of the splitbutton. I have catched the execution event (with ON_XTP_EXECUTE macro) when the user pressed the button part. Now i want to popup the menu, but how? i have expiremented with:

pControl->GetCommandPar()->Popup(); // this has problems when the user press a second time to the button (the popup menu does not close)

and

pControl->OnSetPopup(TRUE); // but this function is protected

please help?

 




Replies:
Posted By: Oleg
Date Posted: 22 April 2004 at 2:30pm
So you want to  ignore button part? Maybe you need Style=xtpControlButtonPopup instead xtpControlSplitButtonPopup

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


Posted By: jerry2000
Date Posted: 23 April 2004 at 1:41am

but now i dont have an arrow near the button. Sorry but i need both the button and the arrow, and both should be have the same behavior.

thanks



Posted By: SuperMario
Date Posted: 27 April 2004 at 11:12am
Then make the Style=xtpControlPopup.


Posted By: jerry2000
Date Posted: 28 April 2004 at 8:00am

When I do this, there is only a arrow visible, and no button icon! Have i do somthing wrong ???

thanks

 



Posted By: Oleg
Date Posted: 29 April 2004 at 10:13am

Such button exists in CustomThemes sample.

   lpCreateControl->controlType = xtpControlPopup;
   lpCreateControl->buttonStyle = xtpButtonIconAndCaption;



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



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