Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
ShanePrice Absent Member.
Absent Member.
2409 views

9.2 RGB Button Colors

Jump to solution

We are trying to use the new button color feature in 9.2, but can't get the colors to work as a variable.  The value can be negative, so we are using signed variables.  The max color value is FFFFFF (16,777,215 = 8 digits).  In the sample excerpt below, Button 1 shows with a Pink background.  The other two buttons have a maroon background.  How can we set the colors at runtime?

Working-Storage Section.

78 RGB-Pink value X#CBC0FF.
01 ws-color-pic pic S9(8).
01 ws-color-int usage is signed-int.

Screeen Section.

01 main-screen.
03 push-button line 2 col 10 title "Button 1" background-rgb RGB-Pink.
03 push-button line 2 col 30 title "Button 2" background-rgb ws-color-pic.
03 push-button line 2 col 50 title "Button 3" background-rgb ws-color-int.

Procedure Division.

move RGB-Pink to ws-color-pic, ws-color-int.
display main-screen.
display message "stop".
destroy main-screen.
stop run.

Tags (1)
0 Likes
1 Solution

Accepted Solutions
Micro Focus Expert
Micro Focus Expert

RE: 9.2 RGB Button Colors

Jump to solution

 Hi Shane .. I think you are very close .. I think the issue is you should use 9.2.1 ... 9.2.0 had a couple issues with the new COLOR feature, 9.2.1 has ecn4230: 9.2.1 which dealt with push-button colors. I put a standard window in your program and named each button ...
03 pb1 push-button
03 pb2 push-button
03 pb3 push-button 
 Now all three show pink.

View solution in original post

0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

RE: 9.2 RGB Button Colors

Jump to solution

 Hi Shane .. I think you are very close .. I think the issue is you should use 9.2.1 ... 9.2.0 had a couple issues with the new COLOR feature, 9.2.1 has ecn4230: 9.2.1 which dealt with push-button colors. I put a standard window in your program and named each button ...
03 pb1 push-button
03 pb2 push-button
03 pb3 push-button 
 Now all three show pink.

View solution in original post

0 Likes
ShanePrice Absent Member.
Absent Member.

RE: 9.2 RGB Button Colors

Jump to solution

I switched to "Micro Focus extend compiler version 9.2.1 + ECN-4243 + ECN-4245" and "Micro Focus extend runtime version 9.2.1 + ECN-4243 + ECN-4245".  The button colors are now working properly.  Thanks!

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.