Custom palette set docking issue

Custom palette set docking issue

hierholzer
Participant Participant
347 Views
0 Replies
Message 1 of 1

Custom palette set docking issue

hierholzer
Participant
Participant

Hello everyone,

 

I have a custom palette set, which I want to dock at the left side of AutoCAD. If there is already docked a palette set window, e. g. the object properties, it will be displayed above the already docked one at first start. See the following screenshot as an example:

 

First start of custom palette setFirst start of custom palette set

 

If there is no pallete set window docked it displays as expected:

 

AutoCAD_PaletteSet_Dock_2.PNG

 

When I now close my custom palette set, dock the properties window back on the left side and open my palette set again it docks the way I also would expect for the first start:

 

AutoCAD_PaletteSet_Dock_3.PNG

 

Here is my code for the custom palette set:

 

 

public class DockingWindow : PaletteSet
{
      private Control userControl;

      public DockingWindow(Control userControl, Guid classId, string caption, DockSides dockSide, DockSides dockEnabled) : base(caption, classId)
      {
         this.userControl = userControl;

         this.Style = PaletteSetStyles.ShowPropertiesMenu | PaletteSetStyles.ShowAutoHideButton | PaletteSetStyles.ShowCloseButton;
         this.DockEnabled = dockEnabled;
         this.Name = caption;

         this.Add(caption, this.userControl);

         this.Size = new Size(userControl.Width, userControl.Height);
         this.MinimumSize = userControl.MinimumSize;

         this.Visible = true;
         this.Dock = dockSide;
      }
}

DockingWindow dockingWindow;
Guid guid = Guid.Empty;

[CommandMethod("CreateDockingWindow")]
public void CreateDockingWindow()
{
         if (this.dockingWindow == null)
         {
            UCTest ucTest = new UCTest();
            guid = ucTest.GetType().GUID;
            dockingWindow = new DockingWindow(ucTest, guid, "Test", DockSides.Left, (DockSides)(DockSides.Left | DockSides.Right));
         }
         else
         {
            this.dockingWindow.Visible = true;
         }
}


Is there a way to dock my custom window next to already docked windows at first start and not above?

 

Thank you in advance.

 

Best regards,

Alex

 

0 Likes
348 Views
0 Replies
Replies (0)