CheckBox editable = false

Questions and answers for designing and implementing forms in Servoy

CheckBox editable = false

Postby stefanoni » Thu Apr 26, 2012 5:50 pm

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 ?
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: CheckBox editable = false

Postby jcompagner » Tue May 01, 2012 9:02 am

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.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: CheckBox editable = false

Postby stefanoni » Wed May 02, 2012 4:07 pm

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 2702 times
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: CheckBox editable = false

Postby gldni » Wed May 02, 2012 6:16 pm

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
Nicholas Dunn
E-Automation Systems, LLC
Servoy 6.1 final
PostgreSQL 9.0
gldni
 
Posts: 120
Joined: Fri May 23, 2008 5:35 pm
Location: MO, USA

Re: CheckBox editable = false

Postby jcompagner » Thu May 03, 2012 12:33 pm

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
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Forms

Who is online

Users browsing this forum: No registered users and 5 guests