PR# 5139 EV_RICH_TEXT.enable_sensitive and background color

Problem Report Summary
Submitter: ericbe
Category: EiffelVision
Priority: Medium
Date: 2005/07/12
Class: Bug
Severity: Serious
Number: 5139
Release: 5.6.1103
Confidential: No
Status: Analyzed
Environment: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)
Synopsis: EV_RICH_TEXT.enable_sensitive and background color

Something has changed between 5.6.0723 and 5.6.1103 when calling EV_RICH_TEXT.enable_sensitive. I have a descendant of EV_RICH_TEXT on which I call `disable_edit'. Because I want the background color to be white even though the widget is not editable, I call `set_background_color' with white as argument in the `initialize' feature. It worked fine with 5.6.0723: when calling `disable_sensitive' the background became grey and `enable_sensitive' was resetting it back to white. But this does not work anymore with 5.6.1103. `disable_sensitive' still sets the background to grey, but `enable_sensitive' does not reset it to white. I have to call `set_background_color' explicitly after executing `enable_sensitive' to reset it back to white. Is it a bug or a feature?
To Reproduce

Problem Report Interactions
From:ericbe    Date:2005/07/12    Download   
==== Julian: Tue Jul 12 13:05:44 PDT 2005 ===============================

Dear Eric,

The change that occured was that `enable_sensitive' for descendents of
EV_TEXT, explicitly set the background color back to white. We changed
this so that it only set the background color to white if the text was
editable. The problem is that for an EV_RICH_TEXT, when disabling the
editable status, it is not grayed out in the same fashion as an EV_TEXT.

The code you had that set the foreground color to white was not required.
If you wish to see the effects of the change, it is `enable' from 
EV_TEXT_IMP. Just remove the `is_editable' check to see the old behavior.

In the same fashion you called `set_background_color' after disabling
edit in the text, I suggest that you also do the same after calling
`enable_sensitive'. The exact behavior regarding when and where the
background is grayed out for texts is currently somewhat fuzzy in 
EiffelVision2 and this definitely needs to be clarified and checked.

==== Julian: Tue Ju
Output truncated, Click download to get the full message