Issue 78298 - greyout of readonly fields in database inconsistent
Summary: greyout of readonly fields in database inconsistent
Status: CONFIRMED
Alias: None
Product: Base
Classification: Application
Component: code (show other issues)
Version: OOo 2.2
Hardware: All All
: P4 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-11 12:26 UTC by aexl
Modified: 2013-08-07 15:45 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
sample db (25.47 KB, application/vnd.sun.xml.base)
2007-06-11 12:27 UTC, aexl
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description aexl 2007-06-11 12:26:30 UTC
see attached database, form "greyout inconsistent"
Comment 1 aexl 2007-06-11 12:27:09 UTC
Created attachment 45803 [details]
sample db
Comment 2 Frank Schönheit 2007-06-11 12:33:06 UTC
fs->pl: any opinion about this? What the issue basically says is that in Edit
controls which are read-only, the text is still black, while in ListBoxes which
are read-only, the text is gray. That's inconsistent, indeed ...
Comment 3 philipp.lohmann 2007-06-11 13:32:49 UTC
There is a difference between read-only and disabled. disabled edit fields are
painted grayed out, read-only controls are just that. Works as designed for me.
Comment 4 Frank Schönheit 2007-06-11 13:55:09 UTC
fs->pl: The forms framework sets the ReadOnly property of the AWT control to
"TRUE", since this is what the user specified for the control (you can see this
in the property browser).
The AWT control forwards this to the ListBox VCL control, by calling its
SetReadOnly method.

ListBox::SetReadOnly is implemented as follows:
  mpImplLB->SetReadOnly( bReadOnly );
  StateChanged( STATE_CHANGE_READONLY );
ListBox::StateChanged( STATE_CHANGE_READONLY ) is implemented as follows:
  if( mpImplWin )
    mpImplWin->Enable( !IsReadOnly() );
  if( mpBtn )
    mpBtn->Enable( !IsReadOnly() );

That is, as soon as you set a list box to readonly, it is effectively disabled
(since mpImplWin and mpBtn are the two sub controls which assemble the ListBox
control).

So the question is: Is there a possibility to implement a "real" readonly-ness
for VCL list boxes?
Comment 5 philipp.lohmann 2007-06-12 04:05:14 UTC
perhaps
Comment 6 aexl 2007-06-17 15:53:16 UTC
I could find no possibility to adjust the text color manually.
(is this a known issue?)

I cannot sell a form with an inconsistent layout to my customers, and if i did,
this was no good for openoffice.
This issue makes it impossible to create forms for customers with consistent
layout, if they contain listboxes. 
So this is a real bug.

If i missed something ploease correct me, i would be glad!
Comment 7 aexl 2007-06-17 15:58:15 UTC
I could find no possibility to adjust the text color manually.
(is this a known issue?)

I cannot sell a form with an inconsistent layout to my customers, and if i did,
this was no good for openoffice.
This issue makes it impossible to create forms for customers with consistent
layout, if they contain listboxes. 
So this is a serious bug.

If i missed something ploease correct me, i would be glad!
Comment 8 Frank Schönheit 2007-06-18 07:07:52 UTC
Whether this is an enhancement request or defect is debatable, but not too
important for the time frame in which it is fixed, so be it.

About the text color: there's no issue for this, AFAIK.
Comment 9 Frank Schönheit 2007-06-18 07:17:02 UTC
The good news is:
As I know remember, I played with read-only-ness of VCL list box controls a
while ago, in the course of issue 74061. As it turned out, read-only-ness works
fine already, disabling the controls in addition is not really necessary.

fs->pl: The workaround I used for issue 74061 is to explicitly enable the
control after it has been set to read-only. We could do something similar for
toolkit/form controls (I tested that it would fix this issue here), but wouldn't
it be better to simply remove the StateChange( STATE_CHANGE_READONLY ) handling?
It would also fix this issue here, but have the side effect that "normal" OOo UI
changes (at least the UI where the user doesn't have native theming).
Comment 10 Rob Weir 2013-07-30 02:18:01 UTC
Reset assignee on issues not touched by assignee in more than 2000 days.