Page 1 of 1

CheckBox editable = false

PostPosted: Thu Apr 26, 2012 5:50 pm
by stefanoni
oFrm.elements['myCheckBox'].editable = false shows the following error:
Java class "com.servoy.j2db.ui.scripting.RuntimeCheckbox" has no public instance field or method named "editable"....

It works fine for all fieldtyp like :
JSField.TEXT_FIELD
JSField.CALENDAR
JSField.RTF_AREA
JSField.COMBOBOX

but NOT for the fieldtyp :
JSField.CHECKS

Is this a Bug ?

Re: CheckBox editable = false

PostPosted: Tue May 01, 2012 9:02 am
by jcompagner
you can't set editable on a check, you only can set that on fields that have free text input (like textfields)
A checkbox or checks (in a list) is never editable, you can enable/disable it but not say it is not editable because it is not editable in the first place at all.

Re: CheckBox editable = false

PostPosted: Wed May 02, 2012 4:07 pm
by stefanoni
In the Formeditor the property editable exists for the checkbox (printscreen), thats why I tried editable. The disabled checkbox looks different to enabled checkbox.

Thank you
Print_Screen_01022.jpg
Print_Screen_01022.jpg (184.86 KiB) Viewed 2732 times

Re: CheckBox editable = false

PostPosted: Wed May 02, 2012 6:16 pm
by gldni
Don't know if this related to this issue, but we have a checkbox in a list view that worked fine in build 1410. Now in build 1411, the checkbox becomes unchecked once the field loses focus. I have created a case. The case number is SVY-2139. To clarify, this is happening in Servoy Version: 6.1.0 b2 - build 1411

Re: CheckBox editable = false

PostPosted: Thu May 03, 2012 12:33 pm
by jcompagner
stefanoni wrote:In the Formeditor the property editable exists for the checkbox (printscreen), thats why I tried editable. The disabled checkbox looks different to enabled checkbox.


that property just sets also the enabled property (because checkbox component in swing doesn't have a editable property)
So it is the same thing.

You can create a case so that we can make this in sync, but your looks of the checkbox will not be any different if you do checkbox.enabled = false or checkbox.editable = false