Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Standalone clickable PopupButton?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Standalone clickable PopupButton?

 Post Reply Post Reply
Author
Message
eugene_v View Drop Down
Groupie
Groupie
Avatar

Joined: 12 September 2007
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote eugene_v Quote  Post ReplyReply Direct Link To This Post Topic: Standalone clickable PopupButton?
    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

 
 
Back to Top
Nutty101 View Drop Down
Groupie
Groupie


Joined: 31 August 2007
Location: United States
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote Nutty101 Quote  Post ReplyReply Direct Link To This Post Posted: 12 September 2007 at 7:33pm
Catch the event and set the active tab back to the last one used?

Back to Top
eugene_v View Drop Down
Groupie
Groupie
Avatar

Joined: 12 September 2007
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote eugene_v Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2007 at 3:30am
Hi,
Instead xtpControlButtonPopup use xtpControlButton
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
eugene_v View Drop Down
Groupie
Groupie
Avatar

Joined: 12 September 2007
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote eugene_v Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2007 at 10:06am
Hi,
I guess ControlBuyNow is CommandBarPopup type, replace it to CommandBarControl
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
eugene_v View Drop Down
Groupie
Groupie
Avatar

Joined: 12 September 2007
Location: Canada
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote eugene_v Quote  Post ReplyReply Direct Link To This Post 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
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2007 at 12:03pm
:) Thanks.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.063 seconds.