Print Page | Close Window

Standalone clickable PopupButton?

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=7988
Printed Date: 18 June 2025 at 11:20am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Standalone clickable PopupButton?
Posted By: eugene_v
Subject: Standalone clickable PopupButton?
Date Posted: 12 September 2007 at 7:27pm
To remind the user he has a demo version of the softare, I want to have a menu item "Buy Now" on the ActiveMenuBar without any childer buttons. Is this possible? When you click on it, no menus are displayed but the Execute event occurs...
 
I tried:
 

Set ControlBuyNow = CommandBars.ActiveMenuBar.Controls.Add(xtpControlButtonPopup, ID_BUY_NOW, "&Buy Now!")
 
 
but it shows an ugly empty menu item under itself.
 
Any ideas?
 
Eugene

 
 



Replies:
Posted By: Nutty101
Date Posted: 12 September 2007 at 7:33pm
Catch the event and set the active tab back to the last one used?



Posted By: eugene_v
Date Posted: 12 September 2007 at 7:38pm

Originally posted by Nutty101 Nutty101 wrote:

Catch the event and set the active tab back to the last one used?

Thanks! What is an active tab? Is it a property? Is there some info about it in the help file?



Posted By: Oleg
Date Posted: 13 September 2007 at 3:30am
Hi,
Instead xtpControlButtonPopup use xtpControlButton

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


Posted By: eugene_v
Date Posted: 13 September 2007 at 9:10am
Originally posted by oleg oleg wrote:

Hi,
Instead xtpControlButtonPopup use xtpControlButton
 
 
Unfortunately I can't... If I do this, I get error 13, type mismatch:
 

Set ControlBuyNow = CommandBars.ActiveMenuBar.Controls.Add(xtpControlButton, ID_BUY_NOW, "&Buy Now!")
 
Is it by design that xtpControlButton cannot be added to ActiveMenuBar? Or is it a bug?


Posted By: Oleg
Date Posted: 13 September 2007 at 10:06am
Hi,
I guess ControlBuyNow is CommandBarPopup type, replace it to CommandBarControl


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


Posted By: eugene_v
Date Posted: 13 September 2007 at 11:14am
Originally posted by oleg oleg wrote:

Hi,
I guess ControlBuyNow is CommandBarPopup type, replace it to CommandBarControl
 
It works!!!!!!!!!!!!!!!! A million thanks from a happy customer!!!
 
Since I started visiting these forums, I immediately saw how helpful Oleg's replies are. Thank you Oleg, you are great. You really know what you are talking about.
 
Let's give a big chear for Oleg and thank him for his hard work!
 
So, in order to have a standalone ActiveMenu item with no sub menus (in other words, a clickable menu in the ActiveMenu that has no children) you do this:
 

 
Dim ControlBuyNow As CommandBarControl
Set ControlBuyNow = CommandBars.ActiveMenuBar.Controls.Add(xtpControlButton, ID_BUY_NOW, "&Buy Now!")
 
 
Eugene
 


Posted By: Oleg
Date Posted: 13 September 2007 at 12:03pm
:) Thanks.

-------------
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