This is a migrated thread and some comments may be shown as answers.

Rename the selected tab title

1 Answer 148 Views
TabbedForm
This is a migrated thread and some comments may be shown as answers.
nima
Top achievements
Rank 1
Veteran
nima asked on 02 Nov 2020, 08:33 AM

Hi

This code correctly changes the name of the tab after a myUserControl is added.
How can I change the title of the selected tab anywhere in the program without calling RadTabbedFormControlEventArgs e?

code snippet:

private void radTabbedFormControl1_TabAdded(object sender, RadTabbedFormControlEventArgs e)
    {
        UserControl1 myUserControl = new UserControl1();
        myUserControl.Dock = DockStyle.Fill;
        e.Tab.Controls.Add(myUserControl);
        e.Tab.Owner.SelectedTab = e.Tab;
        e.Tab.Text = myUserControl.this_title;
    }

 

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 02 Nov 2020, 04:23 PM

Hello,

I would like to note that RadTabbedFormControl offers a SelectedTabChanged event that fires when the currently selected tab has changed. Feel free to use this event if you want to change the title text of the selected tab. 

More information about useful properties, methods, and events in RadTabbedForm are available here: https://docs.telerik.com/devtools/winforms/controls/forms-and-dialogs/tabbedform/properties-methods-events

Offtopic, we kindly ask you to use just one thread for a specific problem to contact us.

I hope this helps. Please let me know if I can assist you further.

Regards,
Nadya
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
TabbedForm
Asked by
nima
Top achievements
Rank 1
Veteran
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or