.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

StatusBar Panes

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
367 Views, 2 Replies

StatusBar Panes

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.
2 REPLIES 2
Message 2 of 3
cgay
in reply to: Anonymous

Glenn,
The documentation appears to be incorrect.
From the AutoCAD Managed Class Reference:
"MaximumWidth (Read/write)
Type
System.Int32

AcPane::DisplayPopupPaneMenu "
"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
Message 3 of 3
Anonymous
in reply to: Anonymous

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::DisplayPopupPaneMenu "
"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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost