Help. How to get data when I focus or click in a QTextBox

thread: 1 message  |  last: about 3 years ago  |  started: thursday, november 25, 2010, 4:02 am pst

#1  |  Spikesiegel Spain
Thursday, November 25, 2010, 4:02 AM PST


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:

$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:

$txtmarca2->AddAction(new QClickEvent(), new QServerAction('txtmarca2_Click'));

protected function txtmarca2_Click($strFormId, $strControlId, $strParameter) {
   $nombre = $txtmarca2->Text;

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

Copyright © 2005 - 2014, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.