Community
Participate
Working Groups
Invoking text.setEditable(false) changes the text's visible background color (at least on Vista). This only happens if the Text has the default bg color. Debugging through the code reveals that control.defaultBackground() returns a different value (handle) in that case. To reproduce: use attached snippet. Press button. Notice that the first text widget changes bg color. Expected: bg color remains unchanged. (if not fixable it should be documented) PS: The following seems to be an ok workaround: retrieving the bg color before invoking setEditable(...) and setting in again afterwards.
Created attachment 171039 [details] Snippet to reproduce issue
Created attachment 171051 [details] Patch Patch and test case. Please review for 2.0 / HEAD.
Sorry this patch was meant for Riena.
(In reply to comment #0) > Expected: bg color remains unchanged. (if not fixable it should be documented) Visually the background did change from white to gray. Why do you think getBackground() should remain unchanged ? What are you trying to do and how this behaviour is causing you trouble ? Closing as won'f fix.
I found it surprising because it is not documented and not consistent (i.e. it only happens when the bg color has not been set). What I'm trying to do: in Riena we manage the widget background color explicitly, depending on certain framework states. This unexpected change was messing that up. Anyway, since I've a workaround I'm ok with WONTFIX.