Apache OpenOffice (AOO) Bugzilla – Issue 78298
greyout of readonly fields in database inconsistent
Last modified: 2013-08-07 15:45:41 UTC
see attached database, form "greyout inconsistent"
Created attachment 45803 [details] sample db
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 ...
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.
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?
perhaps
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!
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!
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.
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).
Reset assignee on issues not touched by assignee in more than 2000 days.