Ok guys, this is a tricky one.
I have a text editor with multiple tabs.
When i click new or i open a new document, a tab opens, with a text box in it.
To do that i just add a new tab to the tab control, and i add a new text box and set it to "Fill" in the tab page.
But what can i do if i want to save a specific file of all the files opened in the tabs? I was thinking of sorting them into an array, but that's wont work cause i don't know how to grab the index of the selected text box.
Any ideas?
Are you a newbie programmer trying to learn C#? Check out my small tutorial: Visual C# Programming Basics
You can check SelectedIndex or SelectedTab property of TabControl. I advise you to create new class wich inherit from TabPage class with method Save().
Then code looks like that:
Code:private static void OnSave() { ((MyTabPage)myTabControl.SelectedTab).Save(); }
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks