getText(QWidget*,QString,QString)

Parent Previous Next

TW.getText(QWidget widget, QString boxTitle, QString infoText [, suggestionPromptText QString]);


Returns text entered by User in an input area.


for widget generally enter null.


boxTitle (at the top of the box) should not be relied on as it may not show in all OS-es


infoText appears close to the text input area


Ok button returns whatever is in the text input area, which can optionally be primed by suggestionPromptText.


Cancel button returns the object undefined


var returned = TW.getText(null, "This Might Not be Seen", "Your Name: ", "Mr., Mrs... ");


     if (returned != undefined)

       {

        TW.information(null, "Answer", returned);

       }


    var returned = TW.getText(null, "This Might Not be Seen", "Hair colour: ");


     if (returned != undefined)

       {

        TW.information(null, "Hair Colour: ", returned);

       }

Created with the Personal Edition of HelpNDoc: Free CHM Help documentation generator