This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Transparent-Color Property in Push Buttons

I am trying to to add the Transparent-Color property to Push Buttons in AcuCobol-GT, Version 10.  

In the below screenshot, I would like the grey around the buttons to be transparent, allowing the blue to show through. 

 

I’ve attached a couple of the bmp’s that are currently in use.  I’ve tried converting these to 16 color, 256 color and 24 bit bmp without success. 

       

I’ve also tried several different values for TRANSPARENT-COLOR in the push button display, using working storage values as well as the integer itself. 

78  WS-TRANSPARENT     VALUE x#c0c0c0.       |Windows Gray 192,192,192

<OR>

78  WS-TRANSPARENT     VALUE x#1000000.    |BM-CORNER-COLOR from ACUGUI.def, as mentioned in the Acucorp doc). 

I've tried the following in Display Push-Button:

TRANSPARENT-COLOR WS-TRANSPARENT

<OR>

TRANSPARENT-COLOR  16777216

 

From the program:

  DISPLAY PUSH-BUTTON  FLAT

         SELF-ACT

         TITLE SWPUSH-TITLE

         LINE SWPUSH-LINE POSITION SWPUSH-COL

         LINES SWPUSH-HEIGHT SIZE SWPUSH-WIDTH

         TERMINATION-VALUE SWPUSH-ESCAPE-CODE-X

        TRANSPARENT-COLOR  WS-TRANSPARENT

         BITMAP-NUMBER 1

         BITMAP-HANDLE SWBITMAP-BITMAP-NUMBER

         HANDLE SWPUSH-HANDLE.

 Is the syntax correct? Everything above, except for the Transparent-Color property, has been in place for some time and works.  This still functions the same as if the property had not been added.

Is the type of bmp compatible with what I am trying to do?

Can I see an example using this property that is working? 

This seems like it should be very straight forward  so I feel like it must be something simple that I am missing.  Any suggestions are greatly appreciated! 

  • 0

    Hello Kim,

    the TRANSPARENT-COLOR only refers to the BITMAP, not the push-button.

    But you could try the BACKGROUND-COLOR option, for example BACKGROUND-COLOR = 1.

  • Suggested Answer

    0

    You have the transparent-color correct. I believe the issue is you're displaying on a toolbar that has a color. If you were to display your push-button on the screen itself, you would see that the gray in the original bitmap image is now transparent. I'll guess that your toolbar uses is color 64 (dark blue), each push button going onto the toolbar also need to use that color. Add  COLOR IS 64 to each toolbar push button and I think you'll get the result you are looking for.

    SW Engineering(QA)  

    Although I am an OpenText employee, I am speaking for myself and not for OpenText.
    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button