.NET
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

How To Add Top Tool In AutoCAD

4 ANTWORTEN 4
Antworten
Nachricht 1 von 5
scgq425
204 Aufrufe, 4 Antworten

How To Add Top Tool In AutoCAD

I use AutoCAD 2016 , and want to add a tool in picture location . 1. use PaletteSet , but when i dock top , this minHeight will bigger then i want so 

has other interface or issues to show this?

scgq425_0-1732779929559.png

    if (PSet == null || PSet.Visible == false)
    {
        var window = new PatternSetWindow();

        PSet = new PaletteSet("TYDI_Document");
        PSet.Visible = true;
        ElementHost host = new()
        {
            AutoSize = true,
            Dock = DockStyle.Fill,
            Child = window
        };
        
        PSet.Style =  PaletteSetStyles.ShowCloseButton | PaletteSetStyles.ShowAutoHideButton  | PaletteSetStyles.ShowPropertiesMenu | PaletteSetStyles.Notify ;
        PSet.Add("TYDI_Document", host);
        PSet.KeepFocus = true;
        PSet.Size = new Size(1200, 30);
        PSet.MinimumSize = new Size(1200, 3);
        PSet.Dock = DockSides.Top;
        PSet.DockEnabled = DockSides.Top;
        //PSet.WindowState = Window.State.Minimized;
        PSet.RecalculateDockSiteLayout();
    }
}

LanHui Xu
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Beschriftungen (1)
4 ANTWORTEN 4
Nachricht 2 von 5
norman.yuan
als Antwort auf: scgq425

Why do you want to use PaletteSet docked on top, instead of standard menu system (Ribbon, namely). You can create your own partial menu using command CUI and distribute/deploy it with your app/plugin together, which can be easily edited/updated. If you really want a dynamically created menu items with code, you can code your own Ribbon tab/panel/items... and load it with your plugin. If you really want to use PaletteSet that looks/works like ToolPaletteSet, then do not expect it can be docked like toolbar.

 

Norman Yuan

Drive CAD With Code

EESignature

Nachricht 3 von 5
scgq425
als Antwort auf: scgq425

Hi @norman.yuan :

i try to use the toolbar to set commands , but designer  want change the button image to text , like : "text align"

in paletteSet , is real- minValues is more than 100 piexls , even set the `MinimumSize` like : 30 

also im try to show only text with cui or mns , but is failed , also has button , do you has the similar example or issue?

 

thanks.

 

LanHui Xu
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Nachricht 4 von 5
norman.yuan
als Antwort auf: scgq425

Why not use ribbon button in Ribbon menu. which can have text caption with or without image?

 

Norman Yuan

Drive CAD With Code

EESignature

Nachricht 5 von 5
scgq425
als Antwort auf: scgq425

Hi @norman.yuan :

in objectarx , i  use the  cAcuiDialog to show this style .

i want to get the same style use c# , beacuse the document web api and other servers api use c# will easy to connect , but try to use toolbar or PaletteSet that cant support .

scgq425_0-1732952304518.png

 

LanHui Xu
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

AutoCAD Inside the Factory


Autodesk Design & Make Report