I am new to progress open edge. I am working on purely open edge progress application. User's requirement is to change color of button on click of second button.
How can this done ?Please suggest.
You can't change the color of a standard button on Windows (I'm assuming this is a GUI application). The only way I can think of to do this with pure ABL (no .NET or other third-party controls) is to use an image on the button and change the image to reflect the current state.
Thanks Matt. Yes it is a GUI application. It would be great if you could tell me the logic for changing image on button dynamically.
The LOAD-IMAGE method allows you to display an image on a button.
OpenEdge supports several image formats, including BMP, JPG, and PNG, among others.
The button may be resized to fit the new image. If you want the button to stay the same size, turn off AUTO-RESIZE before loading the image.
Button1:AUTO-RESIZE = FALSE.
Thanks it worked. But I am facing another issue to fit the image in the button in compact form using load image parameter values. But it does not work.
Load-image("picture" ,[ , x-offset , y-offset , width , height ])
I tried different combinations but everytime the result is same.
1. btn_search:LOAD-IMAGE("C:\Users\Public\Pictures\Sample Pictures\Fat.bmp",7000 , 2550 ,105,35)
2. Using property values(height , width, x , y ) from the button.
btn_search:LOAD-IMAGE("C:\Users\Public\Pictures\Sample Pictures\Fat.bmp",700 , 255 ,105,35).
3. btn_search:LOAD-IMAGE("C:\Users\Public\Pictures\Sample Pictures\Fat.bmp")
Any idea how to resolve this.
I'm not sure I understand what you're trying to do. Do you have a large image that you want to scale down so it fits on the button? The button widget doesn't scale the image. If the image is too large to fit on the button it will be cropped. The optional parameters on the LOAD-IMAGE method let you control the cropping of the image but there's no scaling.
[mention:04e95b8bf7ad413db8577e7108735503:e9ed411860ed4f2ba0265705b8793d05], It will be helpful if you can post some screenshots that describe your problem