![]() |
Display popup menu for drop down push button |
Post Reply ![]() |
Author | |
RedFin ![]() Groupie ![]() ![]() Joined: 26 March 2008 Location: Australia Status: Offline Points: 47 |
![]() ![]() ![]() ![]() ![]() Posted: 16 April 2008 at 10:02pm |
Hi,
I am using a drop down push button and displaying a command bar context menu when the button is clicked, using this code - Private Sub cmdChangeStatus_Click() Dim Popup As CommandBar Set Popup = gRbn.CommandBars.ContextMenus.Find(400) With Popup Select Case ebStatusCode.Value Case "OP": .Controls(1).Enabled = False Case "PA": .Controls(2).Enabled = False Case "PC": .Controls(3).Enabled = False Case "CL": .Controls(4).Enabled = False End Select .ShowPopup End With End Sub The problem is that the popup context menu appears where the mouse was clicked ... that is, over the push button. Can anyone tell me which methods/properties I can control the position of the popup so that it appears at the base of the push button ... I've looked and looked through the help, but can't work out what to use. Alternatively, is there some other method I should be using?? Cheers, Rohan |
|
![]() |
|
wlcabral ![]() Groupie ![]() ![]() Joined: 25 April 2007 Location: Brazil Status: Offline Points: 72 |
![]() ![]() ![]() ![]() ![]() |
Did you try the x,y parameters ?
Public Function ShowPopup( _
Optional ByVal Flags As Variant, _ Optional ByVal x As Variant, _ Optional ByVal y As Variant _ ) As Long Parameters
|
|
wlcabral
|
|
![]() |
|
RedFin ![]() Groupie ![]() ![]() Joined: 26 March 2008 Location: Australia Status: Offline Points: 47 |
![]() ![]() ![]() ![]() ![]() |
Oh dear ... don't I feel stupid
![]() I had copied and pasted the code from one of the samples, so never even saw the intellisense popup in the IDE. I had been looking for things like popup.top etc. Thanks wlcabral. |
|
![]() |
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 |