Moving Controls Between Panels
With the concept of a QLabel
being able to have an arbitrary
number of child controls, we use this example to show how you can dynamically
change a control's parent, to essentially "move" a control from one panel to the next.
The example below has two QPanel
controls, as well as ten QTextBox
who's parents are one of the panels. The buttons have QAjaxActions
move the textboxes back and forth between the panels, or remove the textbox altogether.
Again, note that we are not hard coding a QTextBox->Render anywhere
in our code. We
are simply using the concept of ParentControls
and using the two QBlockControl
functionality to dynamically render the textboxes in the
Finally, notice that while we are doing this using AJAX-based actions, you can just as easily use
Server-based actions as well.