Artic_Ice83
25-01-2008 10:52:48
Hi!
i'd like to create text boxes in recursive way, and if i try this code all works well:
and all text boxes display on my panel.
but i have a question: is there a way to take control of the text boxes created? i explain better my idea.
i want to add event handlers for all the text boxes.
i tried to store the tb1 pointer in a vector (see above the vTextB) and try this
but the change is only in the last text box created.
is there a way to take control of them?
i'd like to create text boxes in recursive way, and if i try this code all works well:
TextBox *tb1;
for(int i=0;i<5;++i)
{
tb1 = panel->createTextBox(mVector.at(i));
tb1->setPosition(100,30*i);
vTextB.push_back(tb1);
}
and all text boxes display on my panel.
but i have a question: is there a way to take control of the text boxes created? i explain better my idea.
i want to add event handlers for all the text boxes.
i tried to store the tb1 pointer in a vector (see above the vTextB) and try this
vTextB.at(0)->addEventHandler(QuickGUI::Widget::EVENT_MOUSE_CLICK,&SimpleGUIDemoApp::tbMBDown,this);
but the change is only in the last text box created.
is there a way to take control of them?