Setting the size of a docked toolwindow?

10 posts, 1 answers
  1. Malcolm
    Malcolm avatar
    13 posts
    Member since:
    Oct 2007

    Posted 31 Jan 2011 Link to this post

    Can set the default size for auto hide, but can't seem to set the size for when the window is docked. Would rather set a minimum size on it to make it usable.

    Is there a way to do this?
  2. Answer
    Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 02 Feb 2011 Link to this post

    Hello Stephen,

    you can set the size of your docked ToolWindow in the following way

    Dim window As ToolWindow = Me.ToolWindow1
    Dim strip As DockTabStrip = DirectCast(window.TabStrip, DockTabStrip)
    strip.SizeInfo.AbsoluteSize = New System.Drawing.Size(100, strip.SizeInfo.AbsoluteSize.Height)

    Hope that helps
    Richard
  3. Malcolm
    Malcolm avatar
    13 posts
    Member since:
    Oct 2007

    Posted 02 Feb 2011 Link to this post

    Thanks Richard. Set me on the right path:

    Dim navwin As HostWindow = Me.RadDock1.DockControl(Navigator, Telerik.WinControls.UI.Docking.DockPosition.Left, Telerik.WinControls.UI.Docking.DockType.ToolWindow)
    Dim strip As DockTabStrip = DirectCast(navwin.TabStrip, DockTabStrip)
    strip.SizeInfo.AbsoluteSize = New System.Drawing.Size(300, strip.SizeInfo.AbsoluteSize.Height)

    Works perfect!
  4. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 02 Feb 2011 Link to this post

    Glad I could help. Please remember to mark as answer.
    Thanks
    Richard
  5. Raji
    Raji avatar
    4 posts
    Member since:
    Mar 2015

    Posted 04 Jan Link to this post

    I create a new tab, to a raddock, but when I try and switch back to another tab, I get

     

    System.NullReferenceException: Object reference not set to an instance of an object.
       at Telerik.WinControls.UI.Docking.DockTabStrip.ProcessFocusRequested(RadElement element)

     

    How do i fix this?

     

    Thanks.

  6. Dess
    Admin
    Dess avatar
    2480 posts

    Posted 04 Jan Link to this post

    Hello, Raji, 

    Thank you for writing.  

    The provided information is not enough for me to replicate the problem locally. Could you please specify the exact steps how to reproduce the problem? Alternatively, you can submit a  support ticket with a complete description of the precise case and provide a sample project demonstrating the exception. Thus, we would be able to make an adequate analysis of your scenario and assist you further. Thank you in advance.

    I am looking forward to your reply. 

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  7. Raji
    Raji avatar
    4 posts
    Member since:
    Mar 2015

    Posted 04 Jan in reply to Dess Link to this post

    I have a document container with 3 tabs on it as the attached snap show.  Each of them works fine right now, and I can switch between them.

    I needed to add another one. From the radDock tab I clicked and did, "Add Tabbed Document". This works fine.

     

    Whens I run the code though, when I try and click on the other tabs it crashes, and the I get the above stack trace.

     

  8. Dess
    Admin
    Dess avatar
    2480 posts

    Posted 05 Jan Link to this post

    Hello, Raji, 

    Thank you for writing back. 

    Following the provided information, I tried to replicate the error but without any success. Please refer to the attached gif file illustrating the behavior on my end. Am I missing something? I have also attached my sample project. Is it possible to provide a video demonstrating what steps do I need to perform in order to obtain the unexpected behavior? Thank you in advance for your cooperation.

    I am looking forward to your reply.

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  9. Raji
    Raji avatar
    4 posts
    Member since:
    Mar 2015

    Posted 05 Jan in reply to Dess Link to this post

    that it was I was doing, but its still crashing, so I redesigned the form from scratch for now at that worked.
  10. Dess
    Admin
    Dess avatar
    2480 posts

    Posted 08 Jan Link to this post

    Hello, Raji, 

    Thank you for writing back. 

    I am glad that after redesigning the problem you were facing has gone.

    If you have any additional questions, please let me know. 

     Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top