Infragistics Home

Infragistics Forums

Infragistics community online discussions.
Welcome to Infragistics Forums Sign in | FAQ
in Search

How to limit tab windows?

Last post 04-29-2008 14:17 by [Infragistics] Mike Dour. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 04-25-2008 19:26

    • somay
    • Top 75 Contributor
    • Joined on 12-10-2007
    • Points 990

    How to limit tab windows?

    How can i control the maximum tab windows  under WinTabbedMDI. I mean, if i want to open only 10 tabs at a time and force the user to close other tabs before opening new tabs then which property should i use?

     

    Thanks,

    • Post Points: 20
  • 04-28-2008 9:38 In reply to

    Re: How to limit tab windows?

    Answer

    The tabbed mdi manager will not allow you to restrict opening mdi children like this. You would need to impose this restriction manually when the user attempts to open a new mdi child.

    • Post Points: 20
  • 04-28-2008 11:49 In reply to

    • somay
    • Top 75 Contributor
    • Joined on 12-10-2007
    • Points 990

    Re: How to limit tab windows?

    Thanks,

    Is it possible that i can get open tab count from ultratabcontrol when we use it with MDI manager. I think if i get back number of open windows i can restrict the user to close already open windows. 

     

    • Post Points: 20
  • 04-28-2008 13:54 In reply to

    Re: How to limit tab windows?

    It would be better to just get the number of mdi children directly from the parent with parentForm.MdiChildren.Length. Each mdi child corresponds to one tab in the tabbed mdi manager, so the number of mdi children is the number of tabs.

    • Post Points: 20
  • 04-29-2008 9:35 In reply to

    • somay
    • Top 75 Contributor
    • Joined on 12-10-2007
    • Points 990

    Re: How to limit tab windows?

    Excellant!!

    It works great. Now i have another question. As tab has some properties like Key, Text or tag. when i open my windows thorugh mdi these properties are empty. One possible reason for that, which sounds good to me, is our windows forms are not tabs they are just forms and if we set these properties to forms, mdi tab control wouldn't inherit it. Is there any way that i can assign these properties to mdi tabs. so that i can use these properties to find out how many instances of a window is currently open.

     

    Thanks,

    • Post Points: 20
  • 04-29-2008 14:17 In reply to

    Re: How to limit tab windows?

    To get information about your mdi child forms like this, you really shouldn't be involving the tabbed mdi manager, which is basically just a component to allow you to layout your forms in an alternative fashion. You can just iterate the mdi children by using the MdiChildren collection I mentioned earlier. You can then count how many of a certain Form type are there.

    That being said, you can handle the InitializeTab event of the tabbed mdi manager to set these properties on a tab when its associated form first opens. You can also get the tab associated with a Form by passing the Form into the TabFromForm method on the tabbed mdi manager.

    • Post Points: 5
Page 1 of 1 (6 items)
Powered by Community Server (Commercial Edition), by Telligent Systems