in

C1 Community

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

Reopen floating docking tab

Last post 11-14-2007 9:16 AM by Wolfgang Knauf. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 11-05-2007 9:27 AM

    Reopen floating docking tab

    I have created a form with a docking control on it with a docking tabs inside. When I peal out a docking tab to a floating window, and say move it over to the right.  I then close this docking tab.  But a min later i wish to reopen this tab.  What I would like is this tab to reopen at its last location. I know how to save the location information. But i don't know how to tell the tab to reopen as a floating window. 

  • 11-05-2007 11:11 AM In reply to

    Re: Reopen floating docking tab

    Hi !

    just a guess: maybe the "C1CommandDock.DockOrFloatChild(...)" method might help (never used it myself, but it was the only thing I found in the docs).

    Best regards

    Wolfgang

  • 11-05-2007 12:08 PM In reply to

    Re: Reopen floating docking tab

     Thank for the idea.  I been working in that method for a bit.  I think it more then lucky easier then I am making it.

     

    This section of tools needs way more examples. 

  • 11-08-2007 6:05 PM In reply to

    • C1_GregL
    • Top 10 Contributor
    • Joined on 06-11-2007
    • Pittsburgh PA
    • Posts 500

    Re: Reopen floating docking tab

    Currently, i think the only way to do programmatically float a TabPage is to add the TabPage to a new DockingTab and use the method you mentioned for the CommandDock (the CommandDock cannot float a TabPage by itself)

    Dim floatTab As New C1DockingTab
    floatTab.TabPages.Add(C1DockingTabPage1)
    C1CommandDock1.DockOrFloatChild(floatTab,
    New Point(x, y))

    Hope that helps,
    Greg L

  • 11-09-2007 2:06 PM In reply to

    Re: Reopen floating docking tab

     Thank you for your help. After a good night sleep i to came up with this solution myself. But I do thank you for your help.  I have nodest some weirdness after creating and opening of the floating tab. But i need more time to come up with more accurate descriptions of this.  But for now it does work. But I have now having trouble getting the X and Y location of this newly created floating control. Any help would be great appreciated.

  • 11-12-2007 3:21 PM In reply to

    • C1_GregL
    • Top 10 Contributor
    • Joined on 06-11-2007
    • Pittsburgh PA
    • Posts 500

    Re: Reopen floating docking tab

    >>But I have now having trouble getting the X and Y location of this newly created floating control. Any help would be great appreciated.

    I'm not sure I understand.  When you create the new floating control you can set the X and Y position, as the "Point" parameter in the code above.  Does this not work for you? or are you trying to Get the X and Y coordinates of a floating tab once it's been moved?  Please clarify.

    Thanks
    -Greg L

  • 11-13-2007 8:24 AM In reply to

    Re: Reopen floating docking tab

    Sorry if you miss understood.  Setting the x y coordinate on the creation of the floating control work correctly. But retrieving the current x y coordinate i did find a small problem.  I created a new docking control in memory, and a new DockingTab in memory. Placed a tab into the dockingtab control and then places that control into the new docking control, and set that to floating.  But when i make reference to that docking control the x y coordinate it gives me is 0 0.  But if I go to that tab that in on those controls and go to its parent parent then i get the correct x y coordinate.

    Dim dockflot As New C1.Win.C1Command.C1CommandDock
    Dim tabcontrol As New C1.Win.C1Command.C1DockingTab
    tabcontrol.Controls.Add(Me.C1DockingTabPage2)
    dockflot.DockOrFloatChild(tabcontrol, New Point(345, 262))

    tabcontrol.Location.X returns 0
    tabcontrol.Location.Y returns 0

    C1DockingTabPage2.Parent.Parent.Location.X returns 345
    C1DockingTabPage2.Parent.Parent.Location.y returns 262 

    Thanks. 


     

  • 11-14-2007 9:16 AM In reply to

    Re: Reopen floating docking tab

    In case it helps: you can use "this.Parent.PointToScreen(...)" to convert  a point to absolute screen coordinates. "PointToClient" is the other way.

    Best regards

    Wolfgang 

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