![]() |
Creating right click pop menu |
Post Reply ![]() |
Author | |
tejsingh ![]() Newbie ![]() Joined: 28 March 2007 Location: United Kingdom Status: Offline Points: 25 |
![]() ![]() ![]() ![]() ![]() Posted: 11 April 2007 at 9:30am |
Hi
I am new to all this just wondering can anyone assist me with this. I have created a calendar and on events when i right click i want a popup menu to appear similar to the one in outlook i have looked at examples but no joy any advice would be much appreciated TJ ![]() |
|
![]() |
|
joeliner ![]() Senior Member ![]() ![]() Joined: 09 June 2006 Status: Offline Points: 273 |
![]() ![]() ![]() ![]() ![]() |
Try this TJ..
![]() Private Sub CalendarControl_ContextMenu(ByVal x As Single, ByVal y As Single) Dim PopupBar As CommandBar, Control As CommandBarControl Debug.Print "On context menu" Dim HitTest As CalendarHitTestInfo Set HitTest = CalendarControl.ActiveView.HitTest If Not HitTest.ViewEvent Is Nothing Then Set ContextEvent = HitTest.ViewEvent.Event ZOrder Set PopupBar = CommandBars.Add("Popup", xtpBarPopup) With PopupBar.Controls .Add xtpControlButton, 1, "&Open Event" .Add xtpControlButton, 2, "&Delete Event" . . . End With PopupBar.ShowPopup End If |
|
![]() |
|
tejsingh ![]() Newbie ![]() Joined: 28 March 2007 Location: United Kingdom Status: Offline Points: 25 |
![]() ![]() ![]() ![]() ![]() |
Cheers for that!
I have adapted what you posted into my calendar_Mousedown procedure. And it works a treat cheers! Just need to get it work when it finds an event. I am creating a com object which is embedded into my progress 4gl program. I have another problem which is i have created the command bar on screen but when i open the object it displays the command bar at the top of the screen. But i can move it around the screen. Can this be disabled?? TJ |
|
![]() |
|
tejsingh ![]() Newbie ![]() Joined: 28 March 2007 Location: United Kingdom Status: Offline Points: 25 |
![]() ![]() ![]() ![]() ![]() |
To add to the above i have another issue:
What i want to do is to have a procedure which will return the item selected from the popup menu is that possible? |
|
![]() |
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 |