how to open form from a button so that it opens as a new tab

1 Answer 83 Views
Form TabbedForm
agustin
Top achievements
Rank 1
Iron
agustin asked on 17 Nov 2021, 02:56 PM | edited on 17 Nov 2021, 04:44 PM
(VB.net) I need to open the forms that I have already created in my project within different tabs of a RadTabbedForm, I calculate that it is something simple but I did not find how to do it

It would also be useful for me to know how to open a form within a radPageViewPage tab


1 Answer, 1 is accepted

Sort by
1
Dess | Tech Support Engineer, Principal
Telerik team
answered on 18 Nov 2021, 11:49 AM

Hello, Agustin,

Such kind of functionality for automatically opening an existing RadForm as a new tab is supported by our RadDock control. RadDock provides a method that allows you to directly dock the form and the document window will be automatically created for you:  
    RadForm1 form = new RadForm1();
    form.BackColor = Color.Pink;
    form.Text = "My Form";
 
    this.radDock1.DockControl(form, DockPosition.Left, DockType.Document);
    form.Show();

RadTabbedForm is not intended to offer automatic handling for opening existing forms in a new tab. You can simulate such kind of functionality if the whole form's content is contained within a common panel for example. Thus, you can remove the respective panel from the form's Controls collection and insert it in the  new RadTabbedFormControlTab.Controls collection.

However, if you need this process to be automatic, please consider using RadDock.

I hope this information helps. If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

agustin
Top achievements
Rank 1
Iron
commented on 18 Nov 2021, 06:33 PM | edited

Hello dess, thank you very much for answering.

ok, if you think it's a better option, which I think is, I'm going to use RadDock. however, could you tell me how do I open these forms that I have created previously, in a RadDock tab, I understand that they are called DocumentWindow.

And on the other hand, can you do some kind of development that allows that form to be open only once, in these DocumentWindow?

To be clearer I leave you an image, each form that I open, that is opened within a new tab.

If possible avoid that it can be opened again if it is already open
Dess | Tech Support Engineer, Principal
Telerik team
commented on 19 Nov 2021, 10:06 AM

Hello, Agustin,

RadDock has the capability of automatically finding and attaching Multiple Document Interface (MDI) child forms as tabbed documents. I would recommend you to have a look at the following help article: https://docs.telerik.com/devtools/winforms/controls/dock/mdi-mode/automatic-mdi-form-handling 
Following this approach, you will be able to show a form and RadDock will automatically generate a DocumentWindow for it. Feel free to add additional conditions to determine whether to create a form if such one is already created. 

Should you have further questions please let me know.
Tags
Form TabbedForm
Asked by
agustin
Top achievements
Rank 1
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or