Community
Participate
Working Groups
Need to be able to draw text that looks disabled. This varies across platforms; some draw gray, some draw stippled etc. Perhaps GC.drawText could support another flag such as DRAW_DISABLED and draw the native thing. On Windows there is a system colour called COLOR_GRAYTEXT and there is also a function called GrayString which could be used. Motif has a similar capability.
I think this is a good idea but it can be low priority. On Windows, we can use COLOR_GRAY text. GrayString() is strictly correct but really only ever is needed on monochrome displays. GrayString() doesn't do CR/LF etc. There is a Motif call to do this but it's no an Xm call (it's in the widget writer helper library).
*** Bug 72207 has been marked as a duplicate of this bug. ***
I checked to see if there is system color for disabled text on Carbon, Cocoa and gtk -- Cocoa: we already have OS.disabledControlTextColor Carbon: there is kThemeTextColorPopupLabelInactive system Color gtk: may be we can use the color from the shell using OS.gtk_style_get_text (style, OS.GTK_STATE_INSENSITIVE, gdkColor) Hence, I think we can get the system color for disabled text on these platforms too.
I need this for Bug 4745 - [StyledText] StyledText does not provide a disabled look (1GG00JX). In my case, GC support only is useless (as StyledText uses TextLayout). New constants for display#getSystemColor() would work better, one for disabled text foreground, and (possibly) one for disabled text background. One problem with this approach is that some plaforms use embossed (3d) text when disabled.
Both solutions described here have problems: 1) DRAW_DISABLED flag for GC.drawText() would not solve the StyledText case. 2) COLOR_WIDGET_DISABLED_FOREGROUND/COLOR_WIDGET_DISABLED_BACKGROUND does not work for platforms that draw disabled text embossed (GTK, Windows Classic). I also notice that on Windows Xp, the disable foreground color of the Button widget is different from the disable foreground of the Label widget. This issue affects both solutions above, since they do not take into consideration which type of widget is being drawn. The theme drawing API (bug#37706) might be the only complete solution for this problem. That API should be able to draw text given the type and state of a widget. I do not think the theme drawing API can be implemented in the 3.6 cycle though.
I also need this fix for I need this for Bug 4745 - [StyledText] StyledText does not provide a disabled look (1GG00JX). In my case the issue is particularly apparent since I have side by side text widgets and styled text widgets that get enabled and disabled in unison. Their proximity highlights how problematic the issue is.
[...] > The theme drawing API (bug#37706) might be the only complete solution for this > problem. That API should be able to draw text given the type and state of a > widget. I do not think the theme drawing API can be implemented in the 3.6 > cycle though. Anything planned for 3.7?
Sorry, the theme drawing API is not plan for 3.7.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.