This post I will show you how rename the tab name as file name.
- First you have to import some libraries.
- Import them as follows
- Go to Open submenu code part.
- before the close() the Open file dialog put this code
using System.IO;
tabControl1.SelectedTab.Text = Path.GetFileName(ofd.FileName);
Next we will see how change tabb's name after the save it
- Goto Save submenu's code part and put the following code parts
tabControl1.SelectedTab.Text = Path.GetFileName(sfd.FileName);
No comments:
Post a Comment