1. Create a base enum having Show and Hide values.
2. Create a class
class SelectShowClass extends RunBase
{
DialogField SelectField;
DialogField DisplayField;
}
3. Write a dialog method in class
public object dialog()
{
Dialog dialog;
;
Dialog=super();
SelectField = dialog.addField(typeid(SelectShow));
DisplayField = dialog.addField(typeid(Name));
dialog.allowUpdateOnSelectCtrl(true);
return dialog;
}
4. write method dialogSelectCtrl
public void dialogSelectCtrl()
{
if(SelectField.value())
{
DisplayField.visible(false);
}
else if(!SelectField.value())
{
DisplayField.visible(true);
}
}
5.write method pack and unpack
public container pack()
{
return connull();
}
public boolean unpack(Container con)
{
return true;
}
6. Create a main method
static void main(Args _args)
{
SelectShowClass SSC = new SelectShowClass();
;
SSC.prompt();
}
No comments:
Post a Comment