EASY QUESTION: Programmatically Open Button Popup |
Post Reply |
Author | |
JasonG
Groupie Joined: 07 July 2008 Status: Offline Points: 76 |
Post Options
Thanks(0)
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 |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
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.... |
|
JasonG
Groupie Joined: 07 July 2008 Status: Offline Points: 76 |
Post Options
Thanks(0)
|
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 |
|
JasonG
Groupie Joined: 07 July 2008 Status: Offline Points: 76 |
Post Options
Thanks(0)
|
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 |
|
strider
Groupie Joined: 16 April 2008 Location: United States Status: Offline Points: 26 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |