R
R
RealKritik2020-09-15 16:05:25
C++ / C#
RealKritik, 2020-09-15 16:05:25

How to save something so that someone knows about it?

A professional can handle such a complex issue !!!
how to save a tabpage tab from tabcontrol, which a new one was called with a button? so that on a new entry it remains. Save the text in the text box without problems, when you open it again everything remains, but I can’t find how to save the tab and find it too. for example, it's like in any browser there is a setting so that all open tabs are saved. below is the usual example of calling tabs .. and then how to save help. I'm still a big newbie.

private void NewTab()
        {
            TabPage tab = new TabPage();
            tab.Text = "Тема";
            TabControl1.Controls.Add(tab);
        }
        private void button1_Click(object sender, EventArgs e)
        {
            NewTab();
        }


they must be added and removed indefinitely and saved when the program is started.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman, 2020-09-16
@yarosroman

Well, when you exit, you save data about open tabs to a file, and when you start, you read and programmatically add tabs.

R
RealKritik, 2020-09-16
@RealKritik

sounds brilliant, but I would like help on how to do this, not what should I do. and saving should be automatic.
by the way, a solution would be suitable when pressing a button to generate or make a copy (or as it would be correct) NewTab(); as if, when pressed, it opens a new tab and creates a second inscription in the code forever, and so that later it can be deleted. but it's scary if there are thousands of tabs (anything can be).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question