Hi,
I'm working with the framework and I have this problem to get some information when I Select or press on a QTextBox. What I I want to do is to o take the information about a textbox, it's name and content to do some operations with them.
Let me explain what I have done.
First, I have a group of QTextBoxes which I create dinamically when I run the form. Any time the user press the “add” button the application create one new QTextBox in my QPanel doing this:
<?php
$txtmarca2 = new QTextBox($this->panel_det1);
$arrTextBox[$cont]= $txtmarca2;
$txtmarca2->Name = “marca”. trim($cont);
?>
that's working ok.
After this I declare a new action for the textbox. This action is a “Click” function:
<?php
$txtmarca2->AddAction(new QClickEvent(), new QServerAction('txtmarca2_Click'));
protected function txtmarca2_Click($strFormId, $strControlId, $strParameter) {
$nombre = $txtmarca2->Text;
QApplication::DisplayAlert($nombre);
}
?>
I prove this in the QTextBox I create dinamically but it doesn't work. But, in the other hand, if I do that in a QTextBox the program create whet it inizialite the QForm it works.
Anybody can help me?, any advice?
Thank you