Line Edit Widget



 Line edit widget is used to enter or display String and numbers.


                                         




Methods



Return Type

Method

Description


clear()

Remove the displayed value on the widget.

str

getText()

Read the data displayed on the widget as a String.


setPasswordMode( enable )

Set or release the password mode.


setText( text )

Set the displayed text as a String.


setValue( value )

Set the entered value on the widget.

float or int

value()

Read the data displayed on the widget as a Numeric.


  setValue( value:String or numbers )

 

  Set the entered value to the line edit widget.


        ㆍ Enter String or numbers to value.



  Example)

   


       obj = canvas.getObject('LineEditWidget');  << Obtain the line edit widget object.

       obj.setValue('LineEditWidget');  << Set 'LineEditWidget' to the line edit widget.

       obj.setValue( 100.9 );  << Set '100.9' to the line edit widget.





                                         



  int or float value()

 

  Read the displayed data on the line edit widget.



  Example)

   


       obj = canvas.getObject('LineEditWidget');   << Obtain the line edit widget object.

       v = obj.value()  << Read the data on the line edit widget.






  setText( text )

 

  Set the text displayed on the line edit widget as a String.



  Example)

   


       obj = canvas.getObject('LineEditWidget');  << Obtain the line edit widget object.

       obj.setText('Text');  << Set 'Text' to the line edit widget.

       





  str getText()

 

  Read the data displayed on the line edit widget as a String.



  Example)

   


       obj = canvas.getObject('LineEditWidget');  << Obtain the line edit widget object.

       v = obj.getText()  << Read the data on the line edit widget as a String.






  clear()

 

  Remove the value of the line edit widget.



  Example)

   


       obj = canvas.getObject('LineEditWidget');  << Obtain the line edit widget object.

       obj.setValue('LineEditWidget');  << Enter 'LineEditWidget' to the line edit widget.

       obj.clear();  << Remove the value of the line edit widget.





                                         



  setPasswordMode( enble )

 

  Set or release the password mode.



  Example)

   


       obj = canvas.getObject('LineEditWidget');  << Obtain the line edit widget object.

       obj.setPasswordMode(1)  << Set the password mode.

       obj.setPasswordMode(0)  << Release the password mode.