![]() |
Second Sub Menu Item xtpControlPopup Populate |
Post Reply ![]() |
Author | |
daveED ![]() Newbie ![]() Joined: 16 August 2006 Location: Australia Status: Offline Points: 37 |
![]() ![]() ![]() ![]() ![]() Posted: 21 August 2006 at 11:29am |
Hellow, Can not Create a third Popupmenu with code.
I can create it in the desiner but not in code
could you please help?
this is what im trying to do in code
Item One
xtpControlPopup > Sub 2 Item 1
xtpControlPopup > Sub 3 Item 1
Sub 3 Item 2
Here is the Code:
Private Sub textArea_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If (Button = 2) Then ZOrder Dim Popup As CommandBar Dim Control As CommandBarControl Set Popup = CommandBars.Add("Popup", xtpBarPopup) With Popup.Controls .Add xtpControlButton, ID_EDIT_CUT, "Cu&t", -1, False .Add xtpControlButton, ID_EDIT_COPY, "&Copy", -1, False .Add xtpControlButton, ID_EDIT_PASTE, "&Paste", -1, False Control.BeginGroup = True .Add xtpControlButton, ID_INSERT_BULLET, "Bullets", -1, False
Set Control = .Add(xtpControlPopup, 0, "Styles") Control.CommandBar.Controls.Add xtpControlButton, ID_OPTIONS_STYLEBLUE, "Luna" Control.CommandBar.Controls.Add xtpControlButton, ID_OPTIONS_STYLEBLACK, "Obsidian"
Control.CommandBar.Controls.Add xtpControlButton, ID_OPTIONS_STYLEAQUA, "Office 12" Set Control = .Add(xtpControlPopup, 0, "Extra Styles")
Control.CommandBar.Controls.Add xtpControlButton, ID_OPTIONS_STYLETESLA, "Tesla" Control.CommandBar.Controls.Add xtpControlButton, ID_OPTIONS_STYLETITAN, "Titan" End With Popup.ShowPopup End If End Sub Yours Faithley,
David
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
instead
Set Control = .Add(xtpControlPopup, 0, "Extra Styles")
try
Set Control = Control.CommandBar.Controls.Add(xtpControlPopup, 0, "Extra Styles") |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
daveED ![]() Newbie ![]() Joined: 16 August 2006 Location: Australia Status: Offline Points: 37 |
![]() ![]() ![]() ![]() ![]() |
Thank you oleg,
That works fine, no worries
![]() |
|
![]() |
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 |