Feedback
Did this article resolve your question/issue?

   

Article

Setting RADIO-SET FGCOLOR attribute ineffective on Windows 2012, 8.1 and later

« Go Back

Information

 
TitleSetting RADIO-SET FGCOLOR attribute ineffective on Windows 2012, 8.1 and later
URL NameSetting-RADIO-SET-FGCOLOR-attribute-ineffective-on-Windows-2012-and-8-1
Article Number000173988
EnvironmentProduct: OpenEdge
Version: 10.2B07, 10.2B08, 11.x, 12.x
OS: Windows 2012, Windows 8.1, Windows 10
Question/Problem Description
Setting the FGCOLOR attribute has no effect on the appearance of the text of RADIO-BUTTONS in a RADIO-SET widget on Windows 2012, 8.1 and later.

The same code shows red text on the RADIO-BUTTONS on Windows 7 and Windows 2008.
 
Steps to ReproduceRun the following code to reproduce this (The RADIO-BUTTONS' text should be RED):

DEFINE VARIABLE RadioSet1 AS CHARACTER NO-UNDO.

DEFINE FRAME f01
  RadioSet1 VIEW-AS RADIO-SET HORIZONTAL 
                    RADIO-BUTTONS "Item 1","1","Item 2","2","Item 3","3" 
                    FGCOLOR 12 BGCOLOR 14 FONT 6 
  WITH NO-LABELS.

ENABLE RadioSet1 WITH FRAME f01.

WAIT-FOR CLOSE OF THIS-PROCEDURE.

​​​​​​​
Clarifying Information
Error Message
Defect/Enhancement NumberDefect PSC00333809
Cause
Some themed controls (including the RADIO-BUTTON, TOGGLE-BOX and COMBO-BOX) always use the colors from the currently selected theme and ignore the text color that was set with SetTextColor (internal). As a result, it is not possible to override the text color on these controls when they are themed.

 
Resolution
As of 11.6.0, theming for the RADIO-BUTTON, TOGGLE-BOX, and COMBO-BOX widgets can be disabled. The controls will have the Windows Classic look when theming is disabled but will allow the controls' text color to be changed.

This fix is enabled with the following settings that can be placed in the [Startup] section of the registry or INI file. There is a separate setting for each type of control:

UseClassicComboBox=yes
UseClassicRadioSet=yes
UseClassicToggleBox=yes

 
Workaround
Option #1
Rename or delete the <client>.exe.manifest file, e.g.

%DLC%\bin\prowin32.exe.manifest
%DLC%\bin\prowin.exe.manifest


Be aware that this will remove windows themes from the application.

Option #2
Set NO-LABELS on the RADIO-BUTTON, TOGGLE-BOX, or COMBO-BOX. Use a read-only FILL-IN widget in place of the other widgets' label.
For example, using a TOGGLE-BOX:
DEFINE VARIABLE TOGGLE-1 AS LOGICAL NO-UNDO INITIAL NO.
DEFINE VARIABLE h_toggle AS WIDGET-HANDLE NO-UNDO.

DEFINE FRAME f01
toggle-1 VIEW-AS TOGGLE-BOX
SIZE 13.4 BY .81
FGCOLOR 12 BGCOLOR 15 FONT 6
AT COL 1 ROW 1
WITH NO-LABELS
SIZE 20 BY 2
.
ENABLE toggle-1 WITH FRAME f01.

CREATE FILL-IN h_toggle
ASSIGN
FRAME = FRAME f01:HANDLE
ROW = 1
COL = 4
HEIGHT = 1
WIDTH = 11
FGCOLOR = 12
FORMAT = "X(13)"
SENSITIVE = NO
VISIBLE = TRUE.

h_toggle:SCREEN-VALUE = "TOGGLE-1".

WAIT-FOR CLOSE OF THIS-PROCEDURE.
Notes
References to Other Documentation:

Progress Article(s):
000020431, How to use a .ini file to deploy an application?
 
Last Modified Date5/20/2020 6:50 AM
Attachment 
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.