.NET

Reply
*Glenn Ryan
Message 1 of 3 (146 Views)

StatusBar Panes

146 Views, 2 Replies
11-02-2005 01:03 AM
Hey everyone,

I'm adding in a Pane to the Application statusbar and everything is good.

I then tried looking for some method/function call to display a context menu
when my pane is right clicked.
In ARX I would have called DisplayPopupPaneMenu off a pointer to the
statusbar. I might be being particularly blind today,
but try as I might, I cannot find anything similar in the managed
wrappers...except for a reference in the Managed Function to ARX Map in the
help. The funny thing is, this supposedly wraps MaximumWidth which takes an
Int...obviously cleverly disguised.

So has anybody got a context menu to work for a pane click event and would
care to share?

Cheers,
Glenn.
Distinguished Contributor
cgay
Posts: 125
Registered: ‎08-02-2005
Message 2 of 3 (146 Views)

Re: StatusBar Panes

11-07-2005 06:23 AM in reply to: *Glenn Ryan
Glenn,
The documentation appears to be incorrect.
From the AutoCAD Managed Class Reference:
"MaximumWidth (Read/write)
Type
System.Int32

AcPane::smileyvery-happy:isplayPopupPaneMenu "
"virtual UINT

DisplayPopupPaneMenu(CMenu& menu);

menu Input menu object representing the context menu that will be displayed

This function displays a context menu above the pane. The context menu is aligned with the upper-left edge of the pane instead of being displayed where the user has clicked on the pane. This function should be used when displaying context menus for ACSB_POPUP style panes.

Returns an unsigned integer representing the ID of the menu item the user selected, or 0 if no menu item was selected
"
In .NET "Public Property MaximumWidth() As Integer", so i believe that this won't work.
But the 'Pane' class inherits from the 'StatusBarItem' class which exposes the event 'Public Event MouseDown(ByVal sender As Object, ByVal e As Autodesk.AutoCAD.Windows.StatusBarMouseDownEventArgs)'. I believe that you could use this event to catch the click then display your context menu.

Good Luck,
CG
*Glenn Ryan
Message 3 of 3 (146 Views)

Re: StatusBar Panes

11-07-2005 08:51 PM in reply to: *Glenn Ryan
Thanks for the reply.

Catching the click is not a problem...I am already doing that, however,
displaying the menu is eluding me.

I created a context menu in code, then when I try to use the show method of
the context menu, it wants a CONTROL object as one of arguments (the control
that owns the menu) and I can't see how to tie this back to the pane I
added.......

Any other suggestions?


wrote in message news:5005503@discussion.autodesk.com...
Glenn,
The documentation appears to be incorrect.
From the AutoCAD Managed Class Reference:
"MaximumWidth (Read/write)
Type
System.Int32

AcPane::smileyvery-happy:isplayPopupPaneMenu "
"virtual UINT

DisplayPopupPaneMenu(CMenu& menu);

menu Input menu object representing the context menu that will be displayed

This function displays a context menu above the pane. The context menu is
aligned with the upper-left edge of the pane instead of being displayed
where the user has clicked on the pane. This function should be used when
displaying context menus for ACSB_POPUP style panes.

Returns an unsigned integer representing the ID of the menu item the user
selected, or 0 if no menu item was selected
"
In .NET "Public Property MaximumWidth() As Integer", so i believe that this
won't work.
But the 'Pane' class inherits from the 'StatusBarItem' class which exposes
the event 'Public Event MouseDown(ByVal sender As Object, ByVal e As
Autodesk.AutoCAD.Windows.StatusBarMouseDownEventArgs)'. I believe that you
could use this event to catch the click then display your context menu.

Good Luck,
CG

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community