in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

CommandDock and DockingTab

Last post 04-16-2008 1:33 AM by C1_DaveT. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 04-14-2008 5:14 AM

    CommandDock and DockingTab

    I am trying to programmatically change the docking from top to left to suit the user's preferences. While the program is running, the original layout of the tabs (i.e. left aligned) is perfect, but when I click to change all to a top dock, the tabs remain left-aligned even though I have specified in code that I would like them top-aligned.

    Here are my dockleft() and docktop() subs:

       Private Sub DockTop()


            btnCReception.Location = New Point(153, 31)
            cboTYear.Location = New Point(153, 31)
            cboTUsers.Location = New Point(296, 31)
            btnTOpen.Location = New Point(439, 30)
            btnTCopyMonth.Location = New Point(582, 30)
            btnTPrint.Location = New Point(725, 30)
            btnTAdminPrint.Location = New Point(867, 30)

            cboExYear.Location = New Point(153, 31)
            cboExUsers.Location = New Point(296, 31)
            btnExOpen.Location = New Point(439, 30)
            btnExPrint.Location = New Point(582, 30)
            btnExAdminPrint.Location = New Point(725, 30)

            btnStaffMan.Location = New Point(153, 31)

            btnDockTop.Location = New Point(153, 31)
            btnDockLeft.Location = New Point(296, 31)

            'MenuCommand Initialize
            MenuCommandDock.Dock = DockStyle.None
            MenuCommandDock.Size = New Size(1016, 91)

            'MenuDockingTab Initialize
            MenuDockingTab.Alignment = Nothing
            MenuDockingTab.TabLayout = Nothing
            MenuDockingTab.Size = New Size(1016, 91)

            MenuCommandDock.Dock = DockStyle.Top

            MenuDockingTab.Alignment = TabAlignment.Top
            MenuDockingTab.AutoHiding = True
        End Sub
        Private Sub DockLeft()

            btnCReception.Location = New Point(10, 60)
            cboTYear.Location = New Point(10, 60)
            cboTUsers.Location = New Point(10, 88)
            btnTOpen.Location = New Point(10, 126)
            btnTCopyMonth.Location = New Point(10, 155)
            btnTPrint.Location = New Point(10, 184)
            btnTAdminPrint.Location = New Point(10, 213)

            cboExYear.Location = New Point(10, 60)
            cboExUsers.Location = New Point(10, 88)
            btnExOpen.Location = New Point(10, 126)
            btnExPrint.Location = New Point(10, 155)
            btnExAdminPrint.Location = New Point(10, 184)

            btnStaffMan.Location = New Point(10, 60)
            btnDockTop.Location = New Point(10, 60)
            btnDockLeft.Location = New Point(10, 88)

            'MenuCommand Initialize
            MenuCommandDock.Dock = DockStyle.None
            MenuCommandDock.Size = New Size(184, 721)

            'MenuDockingTab Initialize
            MenuDockingTab.Alignment = Nothing
            MenuDockingTab.TabLayout = Nothing
            MenuDockingTab.Size = New Size(184, 721)

            MenuCommandDock.Dock = DockStyle.Left

            MenuDockingTab.Alignment = TabAlignment.Left
            MenuDockingTab.AutoHiding = True
        End Sub

     

    Kind Regards. 

  • 04-14-2008 7:52 AM In reply to

    Re: CommandDock and DockingTab

    If a command dock is being used to host C1DockingTab, change Dock property of CommandDock object to Top (it should be left in initial position).

     

    After this, resize the DockingTab control. –

     

    -----------------------------------------------------------

     Me.C1CommandDock1.Dock = DockStyle.Top

          

    Me.C1DockingTab1.Size = New Size(658, 241)

    -----------------------------------------------------------

     

    If command dock is not being used, you may directly change dock property of DockingTab.

     

    I hope this helps.

     

    -Dave.

     

     

    <nigelconrad> wrote in message news:203811@10.0.1.98...

    I am trying to programmatically change the docking from top to left to suit the user's preferences. While the program is running, the original layout of the tabs (i.e. left aligned) is perfect, but when I click to change all to a top dock, the tabs remain left-aligned even though I have specified in code that I would like them top-aligned.

    Here are my dockleft() and docktop() subs:

       Private Sub DockTop()


            btnCReception.Location = New Point(153, 31)
            cboTYear.Location = New Point(153, 31)
            cboTUsers.Location = New Point(296, 31)
            btnTOpen.Location = New Point(439, 30)
            btnTCopyMonth.Location = New Point(582, 30)
            btnTPrint.Location = New Point(725, 30)
            btnTAdminPrint.Location = New Point(867, 30)

            cboExYear.Location = New Point(153, 31)
            cboExUsers.Location = New Point(296, 31)
            btnExOpen.Location = New Point(439, 30)
            btnExPrint.Location = New Point(582, 30)
            btnExAdminPrint.Location = New Point(725, 30)

            btnStaffMan.Location = New Point(153, 31)

            btnDockTop.Location = New Point(153, 31)
            btnDockLeft.Location = New Point(296, 31)

            'MenuCommand Initialize
            MenuCommandDock.Dock = DockStyle.None
            MenuCommandDock.Size = New Size(1016, 91)

            'MenuDockingTab Initialize
            MenuDockingTab.Alignment = Nothing
            MenuDockingTab.TabLayout = Nothing
            MenuDockingTab.Size = New Size(1016, 91)

            MenuCommandDock.Dock = DockStyle.Top

            MenuDockingTab.Alignment = TabAlignment.Top
            MenuDockingTab.AutoHiding = True
        End Sub
        Private Sub DockLeft()

            btnCReception.Location = New Point(10, 60)
            cboTYear.Location = New Point(10, 60)
            cboTUsers.Location = New Point(10, 88)
            btnTOpen.Location = New Point(10, 126)
            btnTCopyMonth.Location = New Point(10, 155)
            btnTPrint.Location = New Point(10, 184)
            btnTAdminPrint.Location = New Point(10, 213)

            cboExYear.Location = New Point(10, 60)
            cboExUsers.Location = New Point(10, 88)
            btnExOpen.Location = New Point(10, 126)
            btnExPrint.Location = New Point(10, 155)
            btnExAdminPrint.Location = New Point(10, 184)

            btnStaffMan.Location = New Point(10, 60)
            btnDockTop.Location = New Point(10, 60)
            btnDockLeft.Location = New Point(10, 88)

            'MenuCommand Initialize
            MenuCommandDock.Dock = DockStyle.None
            MenuCommandDock.Size = New Size(184, 721)

            'MenuDockingTab Initialize
            MenuDockingTab.Alignment = Nothing
            MenuDockingTab.TabLayout = Nothing
            MenuDockingTab.Size = New Size(184, 721)

            MenuCommandDock.Dock = DockStyle.Left

            MenuDockingTab.Alignment = TabAlignment.Left
            MenuDockingTab.AutoHiding = True
        End Sub

     

    Kind Regards. 



    http://helpcentral.componentone.com/cs/forums/p/74940/203811.aspx#203811

  • 04-15-2008 4:32 AM In reply to

    Re: CommandDock and DockingTab

    Thanks very much, but I'm still having trouble.

    After removing the CommandDock, the menu adjusted programmatically from left-alignment to top-alignment like a dream! But, unfortunately, removing the CommandDock also removes the ability to AutoHide the menu, which is vital to my application.

    My 2 subs act as follows:

    DockLeft() docks the menu on the left within the CommandDock. Because the menu is set up like this in the designer, it displays perfectly in run-time.

    DockTop() occurs once the user has clicked "Dock Menu at Top". The menu docks at the top, but the tabs still run on the left even though I have coded " MenuDockingTab.Alignment = TabAlignment.Top".

    Here is my revised code:

     
     Private Sub DockTop()

            btnCReception.Location = New Point(153, 31)
            cboTYear.Location = New Point(153, 31)
            cboTUsers.Location = New Point(296, 31)
            btnTOpen.Location = New Point(439, 30)
            btnTCopyMonth.Location = New Point(582, 30)
            btnTPrint.Location = New Point(725, 30)
            btnTAdminPrint.Location = New Point(867, 30)

            cboExYear.Location = New Point(153, 31)
            cboExUsers.Location = New Point(296, 31)
            btnExOpen.Location = New Point(439, 30)
            btnExPrint.Location = New Point(582, 30)
            btnExAdminPrint.Location = New Point(725, 30)

            btnStaffMan.Location = New Point(153, 31)

            btnDockTop.Location = New Point(153, 31)
            btnDockLeft.Location = New Point(296, 31)

            'MenuDockingTab Initialize
            C1CommandDock1.Dock = DockStyle.Top
            MenuDockingTab.Alignment = TabAlignment.Top
            MenuDockingTab.Size = New Size(1016, 91)
            MenuDockingTab.AutoHiding = True

        End Sub
        Private Sub DockLeft()

            btnCReception.Location = New Point(10, 60)
            cboTYear.Location = New Point(10, 60)
            cboTUsers.Location = New Point(10, 88)
            btnTOpen.Location = New Point(10, 126)
            btnTCopyMonth.Location = New Point(10, 155)
            btnTPrint.Location = New Point(10, 184)
            btnTAdminPrint.Location = New Point(10, 213)

            cboExYear.Location = New Point(10, 60)
            cboExUsers.Location = New Point(10, 88)
            btnExOpen.Location = New Point(10, 126)
            btnExPrint.Location = New Point(10, 155)
            btnExAdminPrint.Location = New Point(10, 184)

            btnStaffMan.Location = New Point(10, 60)
            btnDockTop.Location = New Point(10, 60)
            btnDockLeft.Location = New Point(10, 88)

            'MenuDockingTab Initialize
            C1CommandDock1.Dock = DockStyle.Left
            MenuDockingTab.Alignment = TabAlignment.Left
            MenuDockingTab.Size = New Size(184, 721)
            MenuDockingTab.AutoHiding = True

        End Sub

    Please could you provide me with an email address that I could send screenshots to as you're image inserter is not working.

    Kind Regards.
     

     

  • 04-16-2008 1:33 AM In reply to

    Re: CommandDock and DockingTab

    You may send your query on –

     

     support@componentone.com

     

    It will be helpful if you could send us a small sample to replicate the scenario.

     

    This will make it easier for us to check the code used by you and also to modify it to give desired result.

     

    Currently I am not clear about many points, such as why do you need to remove command dock, because command dock can also be docked to Top, I am also not clear about number of different controls which are being used, initially it seemed to me that you are only using a DockingTab on a Command Dock.

     

    Therefore I would request you to clarify these points.

     

    -Dave.

     

     

    <nigelconrad> wrote in message news:203857@10.0.1.98...

    Thanks very much, but I'm still having trouble.

    After removing the CommandDock, the menu adjusted programmatically from left-alignment to top-alignment like a dream! But, unfortunately, removing the CommandDock also removes the ability to AutoHide the menu, which is vital to my application.

    My 2 subs act as follows:

    DockLeft() docks the menu on the left within the CommandDock. Because the menu is set up like this in the designer, it displays perfectly in run-time.

    DockTop() occurs once the user has clicked "Dock Menu at Top". The menu docks at the top, but the tabs still run on the left even though I have coded " MenuDockingTab.Alignment = TabAlignment.Top".

    Here is my revised code:


     Private Sub DockTop()

            btnCReception.Location = New Point(153, 31)
            cboTYear.Location = New Point(153, 31)
            cboTUsers.Location = New Point(296, 31)
            btnTOpen.Location = New Point(439, 30)
            btnTCopyMonth.Location = New Point(582, 30)
            btnTPrint.Location = New Point(725, 30)
            btnTAdminPrint.Location = New Point(867, 30)

            cboExYear.Location = New Point(153, 31)
            cboExUsers.Location = New Point(296, 31)
            btnExOpen.Location = New Point(439, 30)
            btnExPrint.Location = New Point(582, 30)
            btnExAdminPrint.Location = New Point(725, 30)

            btnStaffMan.Location = New Point(153, 31)

            btnDockTop.Location = New Point(153, 31)
            btnDockLeft.Location = New Point(296, 31)

            'MenuDockingTab Initialize
            C1CommandDock1.Dock = DockStyle.Top
            MenuDockingTab.Alignment = TabAlignment.Top
            MenuDockingTab.Size = New Size(1016, 91)
            MenuDockingTab.AutoHiding = True

        End Sub
        Private Sub DockLeft()

            btnCReception.Location = New Point(10, 60)
            cboTYear.Location = New Point(10, 60)
            cboTUsers.Location = New Point(10, 88)
            btnTOpen.Location = New Point(10, 126)
            btnTCopyMonth.Location = New Point(10, 155)
            btnTPrint.Location = New Point(10, 184)
            btnTAdminPrint.Location = New Point(10, 213)

            cboExYear.Location = New Point(10, 60)
            cboExUsers.Location = New Point(10, 88)
            btnExOpen.Location = New Point(10, 126)
            btnExPrint.Location = New Point(10, 155)
            btnExAdminPrint.Location = New Point(10, 184)

            btnStaffMan.Location = New Point(10, 60)
            btnDockTop.Location = New Point(10, 60)
            btnDockLeft.Location = New Point(10, 88)

            'MenuDockingTab Initialize
            C1CommandDock1.Dock = DockStyle.Left
            MenuDockingTab.Alignment = TabAlignment.Left
            MenuDockingTab.Size = New Size(184, 721)
            MenuDockingTab.AutoHiding = True

        End Sub

    Please could you provide me with an email address that I could send screenshots to as you're image inserter is not working.

    Kind Regards.
     

     



    http://helpcentral.componentone.com/cs/forums/p/74940/203857.aspx#203857

Page 1 of 1 (4 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.