Bug 160881 - Forms: Checkboxes and Radiobuttons couldn't set readonly, only could set disabled
Summary: Forms: Checkboxes and Radiobuttons couldn't set readonly, only could set disa...
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks:
 
Reported: 2024-05-01 06:30 UTC by Robert Großkopf
Modified: 2024-05-17 14:02 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2024-05-01 06:30:34 UTC
Download
https://bugs.documentfoundation.org/attachment.cgi?id=193905

Open the form.
There are shown different columns of controls.
First column will show controls set to readonly → no, enabled → yes.
Second column will show controls set to readonly → no, enabled → no. All controls are greyed out. 
Third column will show controls set to readonly → yes, enabled → yes. Controls aren't greyed out except listbox (bug 160869).

Checkboxes and radiobuttons couldn't be set "readonly", so no possibility to show them not greyed out and don't allow to change data.

All controls should support the property "readonly". This property should show the current values in black color (or the color I have been set) without setting greyed out.

This behavior appears in all LO-versions, no regression I think.

Tested with
Version: 24.2.2.2 (X86_64) / LibreOffice Community
Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01
CPU threads: 6; OS: Linux 6.4; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: de-DE
Calc: threaded
Comment 1 Stéphane Guillou (stragu) 2024-05-16 12:12:04 UTC
I guess this report, bug 160869 and bug 160882 make me wonder:
What exactly is the difference between "disabled" and "read-only"?
My understanding of the terms is:
- disabled: can not be used / interacted with
- read-only: can be used, but can not be edited
... but what does that mean in terms of form controls?

More on that: https://ux.stackexchange.com/questions/118020/best-practice-readonly-vs-disabled-in-form-controls

(I couldn't find LO help that spells out what the difference is.)

So, following that logic, I think it makes sense that checkboxes and radio don't have a "read-only" state, given that their binary or tristate values are static values that can never be entered by hand anyway.
In my opinion, this is "not a bug".
What do you think?

(In OOo 3.3, these two form controls didn't have the Read-only option either)
Comment 2 Robert Großkopf 2024-05-16 12:47:37 UTC
My opinion:

read only: 
You could see the content as defined. Black font will be black. But you can't change the content. Might be set a cursor in this content to copy, but nothing else.

disabled:
You can't change anything. Whole control should be greyed out to show this for the user. Cursor couldn't be set in such a control.

Read only should be used if content should be recognized by the user.
Disabled should be used if content isn't needed, make no sense together with chosen options.
Comment 3 QA Administrators 2024-05-17 03:16:21 UTC Comment hidden (obsolete)
Comment 4 Heiko Tietze 2024-05-17 14:02:03 UTC
Simple controls such as checkboxes, radiobuttons, and pushbuttons don't have an editable resp. readonly property by default. If such thing would exist you cannot know as user why clicking a button has no effect. That's indicated and perfectly applied via the enabled state. 

Just use a label to show the information and use the visible/enabled option for conditional scenarios.