I'm using WBPro to design a window layout. I place a CwComboBox on the window. The default background color for this widget is White - which is what I want. I save the window, then edit it, then save it again. Now, suddenly, the background color for my CwComboBox is no longer white - it is the color returned by the #background class method in OSWidget (OS getSysColor: ColorBtnface).
I have found I can solve the problem if I change the OSComboBox #background class method from this:
- Code: Select all
background
"Answer the default background color for instances of the recevier."
IsWin95 ifTrue: [^OS getSysColor: ColorWindow].
^super background
to this:
- Code: Select all
background
"Answer the default background color for instances of the recevier."
Is95Shell ifTrue: [^OS getSysColor: ColorWindow].
^super background
(IsWin95 was changed to Is95Shell.) I hesitate to do this because the change is in WindowPlatformWidgets. Is this a bug? Is this an appropriate solution?