Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Second Sub Menu Item xtpControlPopup Populate
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Second Sub Menu Item xtpControlPopup Populate

 Post Reply Post Reply
Author
Message
daveED View Drop Down
Newbie
Newbie


Joined: 16 August 2006
Location: Australia
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote daveED Quote  Post ReplyReply Direct Link To This Post Topic: Second Sub Menu Item xtpControlPopup Populate
    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
 
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: 21 August 2006 at 2:57pm
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
Back to Top
daveED View Drop Down
Newbie
Newbie


Joined: 16 August 2006
Location: Australia
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote daveED Quote  Post ReplyReply Direct Link To This Post Posted: 22 August 2006 at 2:41am
Thank you oleg,
That works fine, no worries
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.043 seconds.