Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - EASY QUESTION: Programmatically Open Button Popup
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

EASY QUESTION: Programmatically Open Button Popup

 Post Reply Post Reply
Author
Message
JasonG View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post Topic: EASY QUESTION: Programmatically Open Button Popup
    Posted: 25 July 2008 at 1:37pm
I have a commandbar button with a split/dropdown. When the button is clicked, I would like the dropdown menu to appear as if the dropdown arrow was clicked.

Private Sub CommandBarsThread_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)
  If Control.Id = 18 Then
        .....
  End If
End Sub
Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2008 at 2:38pm
Hi,
 
Try this:
 

Control.Execute
 
or
 
CommandBars.FindControl(, ID_FILE).Execute
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....
Back to Top
JasonG View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2008 at 2:49pm
I tried that, and that gives me an 'out of stack space' error, because I'm causing an infinite loop.


Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6
Back to Top
JasonG View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Status: Offline
Points: 76
Post Options Post Options   Thanks (0) Thanks(0)   Quote JasonG Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2008 at 3:01pm
I should probably show how I am creating it as well.. an embedded frame.

Dim ControlForm As CommandBarControlCustom
Set ThreadBar2 = CommandBarsThread.Add("ThreadBar2", xtpBarRight)
Set C = ThreadBar2.Controls.Add(xtpControlSplitButtonPopup, 18, "Move To")
C.CommandBar.Controls.DeleteAll
Set ControlForm = C.CommandBar.Controls.Add(xtpControlCustom, 666, "Move")
ControlForm.Handle = fSendTo.hWnd


Product: Xtreme SuitePro (ActiveX) 12.0.1
Platform: Windows Vista/XP
Language: Visual Basic 6.0 SP6
Back to Top
strider View Drop Down
Groupie
Groupie


Joined: 16 April 2008
Location: United States
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote strider Quote  Post ReplyReply Direct Link To This Post Posted: 05 November 2008 at 3:41pm

The split popup control has a commandbar object.  The commandbar object has a showpopup method.  I used it right in the execute event to force the menu popup to appear:

Private Sub CommandBars_Execute(ByVal Control As XtremeCommandBars.ICommandBarControl)
Dim controlpop As CommandBarPopup
If Control.ID = TBID_SplitButton Then
      Set controlpop = Control
      controlpop.CommandBar.ShowPopup
end if
 
ActiveX 13.2.1

Strider
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.156 seconds.