for (int i = 0; i < m_Options->GetSelected(); ++i) {
TString Text("Added ");
Text += i+1;
Text += “/”;
Text += m_Options->GetSelected();
TGLabel* Label = new TGLabel(m_OptionsFrame, Text);
m_OptionsFrame->AddFrame(Label);
}
MapSubwindows();
// Give this element the default size of its content:
Resize(GetDefaultSize());
Layout();
MapWindow();
}[/code]
Note that I removed the extra composite frame m_OptionsSubFrame and changed a bit the original code.