.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Reply
Message 1 of 8
connieleo
906 Views, 7 Replies

dock panel

Could anyone give me some example of dock panel by c#.net tools? I need see the codes. Thanks a lot.
7 REPLIES 7
Message 2 of 8
Anonymous
in reply to: connieleo

using System;
using Autodesk.AutoCAD.Runtime;
using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.Windows;

namespace AppPaneExample
{
public class ApplicationPanes
{
[CommandMethod("CreateAppPane")]
public static void AddApplicationPane()
{
Pane appPaneButton = new Pane();

appPaneButton .Enabled = true;
appPaneButton .Visible = true;
appPaneButton .Style = PaneStyles.Normal;
appPaneButton .Text = "Application Pane Button";
appPaneButton .ToolTipText = "This button is on the
application pane";

appPaneButton .MouseDown += new
StatusBarMouseDownEventHandler(OnMouseDown);


Autodesk.AutoCAD.ApplicationServices.Application.StatusBar.Panes.Add(appPane
Button);
}

private static void OnMouseDown(object sender,
StatusBarMouseDownEventArgs e)
{
Pane paneButton = (Pane) sender;

if (paneButton.Style == PaneStyles.PopOut)
{
paneButton.Style = PaneStyles.Normal;

Autodesk.AutoCAD.ApplicationServices.Application.StatusBar.Update();

Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog("The pane
is activated.");
}
else
{
paneButton.Style = PaneStyles.PopOut;

Autodesk.AutoCAD.ApplicationServices.Application.StatusBar.Update();

Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog("The pane
is de-activated.");
}
}
}
}

**WARNING** -- I ripped this out of some example code and modified it
slightly. It hasn't been tested.
--
Bobby C. Jones
http://www.acadx.com

wrote in message news:5009294@discussion.autodesk.com...
Could anyone give me some example of dock panel by c#.net tools? I need
see the codes. Thanks a lot.
Message 3 of 8
connieleo
in reply to: connieleo

Thanks. I create the .cs file and .dll file. It can't appear the dock panel. Could you help me to see it?
Message 4 of 8
Anonymous
in reply to: connieleo

You must type "CreateAppPane" at the command line after loading the
assembly.
--
Bobby C. Jones
http://www.acadx.com

wrote in message news:5011745@discussion.autodesk.com...
Thanks. I create the .cs file and .dll file. It can't appear the dock panel
Could you help me to see it?
Message 5 of 8
connieleo
in reply to: connieleo

Thank you for your answer. I type CreateAppPane in the command line. But nothing appears. What about in your computer? Thanks a lot.
Message 6 of 8
Anonymous
in reply to: connieleo

Are you looking at the status bar ? (at your screen's lower right corner)

--
Saludos, Ing. Jorge Jimenez, SICAD S.A., Costa Rica


wrote in message news:5013483@discussion.autodesk.com...
Thank you for your answer. I type CreateAppPane in the command line. But
nothing appears. What about in your computer? Thanks a lot.
Message 7 of 8
Anonymous
in reply to: connieleo

It shows on mine.
--
Bobby C. Jones
http://www.acadx.com

wrote in message news:5013483@discussion.autodesk.com...
Thank you for your answer. I type CreateAppPane in the command line. But
nothing appears. What about in your computer? Thanks a lot.
Message 8 of 8
connieleo
in reply to: connieleo

Thanks a lot. Very appreciated.

Another question. Could anyone have the simple sample to show the dialog just like Design Center dialog. The dialog can exit in AutoCAD when you run other program in the command. Thanks again

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