BUTTON
| Name space |
rialto.widget |
| FILE |
rialtoEngine\javascript\components\controls\button.js |
| NAME |
BUTTON |
| INHERITS |
AbstractComponent
|
| VERSION |
0.86 |
| update |
|
| DESCRIPTION |
This object create a button |
CONSTRUCTOR
| Name |
Type |
Description |
Default |
| top |
int |
Top position (in pixel) |
0 |
| left |
int |
Left position (in pixel) |
0 |
| title |
String |
Text in the button |
|
| alt |
String |
text in tooltip |
|
| parent |
String or reference |
Reference of an HTML or a javascript element parent of the button html element |
|
| objPar.adaptToText |
boolean |
if true the width of the button is equal to the text size |
true |
| objPar.enable |
boolean |
initial enable state of the button |
true |
| objPar.witdhMin |
int |
minimal width |
88 |
| objPar.width |
int |
fixed with of the button |
88 |
Example:
var BRES = new rialto.widget.Button(290,290,"Reset","Erase the text",CADREC,{adaptToText:true,widthMin:100});
PUBLIC METHODS
| Method |
Arguments list |
Return value |
Inherits |
To redefine |
|
setEnable
|
boolean isEnable |
void |
no |
no |
|
setTitle
|
String title |
void |
no |
no |
|
onclick
|
|
|
no |
yes |
setEnable
this method will allow to enable or disable the button according to the parameter
Parameters:
boolean isEnable:True to enable the button
setTitle
this method will allow to change the text in the button
Parameters:
String title:new text
onclick
this method will be raise afert clicking on the button
Parameters:
The code must be redefine after the instanciation of the component. By default this method does nothing.