I need a series of checkbox’s as a menu selection tool in a form. The user simply checks the box against the report he’d like to preview.
I need to be able to influence the box’s (ensure only one checked at run time) but I don’t see any properties to change a checkbox outside of a data provider?
ngervasi:
Why don’t you use radios? Radio buttons looks like checkbox but don’t allow multiple selection.
That was my initial thought but again, I cant see a way to provide them without a data provider?
In fact I cant see how to place them on a form!!! I assume its a field with the type set to RADIOS - but this just results in a field element - not the RADIOS I expected.
Create a form variable (or a global variable if you are not using Servoy 4.x), place it on the form, select to display as Radios and attach a valuelist to the field and you’re done, no need to bind it to a specific table column.
The valuelist should contain the options that the user can choose, reports in your case.
Radio buttons work the same as a combobox, only the UI is different.
And then when the user press the “Go” button (or whatever you are using) in a method you evaluate the form var content like this:
switch(FormVariableToSelectTheReportType)
{
case 1: forms.niceReport.controller.show()
break;
case 2: forms.betterReport.controller.show()
break;
case 3: forms.gorgeousReport.controller.show()
break;
}
And then when the user press the “Go” button (or whatever you are using) in a method you evaluate the form var content like this:
switch(FormVariableToSelectTheReportType)
{
case 1: forms.niceReport.controller.show()
break;
case 2: forms.betterReport.controller.show()
break;
case 3: forms.gorgeousReport.controller.show()
break;
}