Push Button



 PushButton is a widget that has a function of buttons.


                                         



Methods



Return Type

Method

Description

 

setText( text )

Change the text of buttons.

int

getFlat()

Obtain the state of button shapes.


setFlat( value )

Set the shape of buttons as a Flat.



  setText( text:Text )

 

  setText change the displayed text on the button as text.



  Example)

   


       obj = canvas.getObject('PushButton');  << Obtain the PushButton object.

       obj. setText(‘Confirm’);  << Change the text of the button as 'Confirm'


   



                                         



  setFlat( value:Number )

 

  setFlat change the shape the of buttons.


        ㆍ Value 0 is a default shape.

        ㆍ Value 1 is that an appearance is invisible and reveals when the button clicked.



  Example)

   


       objobj = canvas.getObject('PushButton');  << Obtain the PushButton object.

       obj. setFlat( 0 );

       obj. setFlat( 1 );

   




                                                



  int getFlat()

 

  getFlat obtains the status value of button shapes.


        ㆍ Return values are 0 and 1(FALSE, TRUE)

        ㆍ Return value 0 is a default shape.

        ㆍ Return value 1 is that an appearance is invisible and reveals when the button clicked.



  Example)

   


       obj = canvas.getObject('PushButton');  << Obtain the PushButton object.


       obj. setFlat( 0 );    << Set the shape as a default(0).

       a = obj. getFlat( );  << Enter the shape value on a.


       obj. setFlat( 1 );    << Set the shape as a no appearance(1).

       b = obj. getFlat( );  << Enter the shape value on b.