Question about Gtk::Notebook::append_page
- From: Mislav Blazevic <krofnica996 gmail com>
- To: gtkmm-list gnome org
- Subject: Question about Gtk::Notebook::append_page
- Date: Thu, 27 Dec 2012 21:32:44 +0100
Hi, I'm new to Gtkmm and I need some help.
I want each page to contain same widgets, but have different text in entries, so since I store data from Gtk::Entry elsewhere, I want to reuse same widgets.
This is What I did:
First created initial page:
Notebook.append_page(Box); // Box contains all widgets
I also added a button for creating a new page:
void Somewhere::ButtonClicked()
{
Notebook.append_page(Box); //<--- Same Box
}
And, on notebook switch page:
void Somewhere::ChangedPage()
{
// restore data from entries for this page from std::list<DatazFromEntries>
}
Now, this crashed(?) because I was adding same Box to both pages.
Any workaround for this? Or I will have to create a copy of all widgets for each page(Expensive?)?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]