Method to make entire form non-editable?

Hi Folks

I know I can make specific fields non-editable on a form, and if I want to make the entire form non-editable I can loop through all of the editable fields and re-set to non-editable. But is there an easier solution?

Is there a method to simply make the entire form editable / non-editable ?

yes, just do:

controller.enable = false
(this will also dis-able all buttons)

or
controller.readOnly = true.

Hope this helps

Harjo:
yes, just do:

controller.enable = false
(this will also dis-able all buttons)

or
controller.readOnly = true.

Hope this helps

Exactly what I was looking for Harjo - thanks.

Hi Harjo

How do you handle that enable sets its own grey (to the font and to the border!) and readOnly and editable (design time property) does not? I get quite a confusing mismatch as the behaviour of these 3 properties are not the same when, for example, doing a search (search not posible if editable checked, for example). I also get not nice looking interferences with Servoy defined and in our style sheet defined greys which leds to confusing greys on a form where users don’t know what the different greys should mean.
Can I define the grey used with the enable property somewhere?

Regards, Robert

Harjo:
yes, just do:

controller.enable = false
(this will also dis-able all buttons)

or
controller.readOnly = true.

Hope this helps

you cant, that graying out is something of the look and feel.
disabled stuff always looks like that.

for that you should use readonly that is different from enabled because that only makes sure that the text is not editable
not that the complete component is disabled or not.

As you mention, it’s not that easy with the selection of readOnly, enable, and editable. Each has its own behaviour - some are obvious (to me) some are less obvious. Behaviour is not the same for search (for example, non-editable is non-searchable), and if one uses readOnly and sets a grey style to indicate its read only (how else should the user know it’s read only?) when inserting a new record one has the field manually to apply styles (black when inserting, grey when recorded inserted).

I am still not so happy with these options, as they seem not very coherently to me and need quite a lot of knowledge to allow to make a consistent user interface.
If your experience is different, I would like to hear about how you do it for all possible cases which can arise in a user interface. How do other handle this?

Regards, Robert

jcompagner:
you cant, that graying out is something of the look and feel.
disabled stuff always looks like that.

for that you should use readonly that is different from enabled because that only makes sure that the text is not editable
not that the complete component is disabled or not.

But all user interfaces that i see it is pretty basic setting

readonly: gray background but normal text color
enabled: grab background and gray text color (really disabled look)

so if you want to do something else don’t use over those colors.

If i see a user interface a textfield where i should type in stuff, then i expect that it is just white. You can ofcourse have some variations but if it is gray i think ook it is readonly (at least) and if the text is also gray i know it is disabled all together.

Hi Johann

This may be true for Windows and for single fields, but if you have lists, there is no grey background but the alternating color (may be one of it is grey .-) On Macs, you get a blue background if you can enter a single field and edit it.

If you look at the attached iTunes screenshot, you see it’s not that easy. And you wouldn’t want all the non-editable fields (like for example song name) grey, would you?

Best regards, Robert

jcompagner:
But all user interfaces that i see it is pretty basic setting

readonly: gray background but normal text color
enabled: grab background and gray text color (really disabled look)

so if you want to do something else don’t use over those colors.

If i see a user interface a textfield where i should type in stuff, then i expect that it is just white. You can ofcourse have some variations but if it is gray i think ook it is readonly (at least) and if the text is also gray i know it is disabled all together.

lists are different because for list you dont make the fields/labels that you see your data in readonly no you make the list itself readonly/non editable.

talking about windows, by default windows dont even really know editable tables as far as i know.