Progress
External Program
Interfaces
Managing COM Object Font and Color Settings
You can manage both fonts and colors for COM objects from the 4GL. However, the 4GL provides more direct support for color than for font management.
Managing Fonts
Most Automation Servers or ActiveX controls that support font manipulation provide an associated Font object to manage font changes. As such, you can use Font object properties and methods to read or set font values for the COM object. For information on font support, see the documentation on your Automation Server or ActiveX control. Otherwise, there is no mapping between COM object font settings and the Progress font information maintained by the FONT-TABLE system handle.
Managing Colors
COM objects accept color specifications in the form of an RGB (Red/Green/Blue) integer value. However, Progress widgets accept color specifications in the form of an integer index into a color table managed by the COLOR-TABLE system handle. To support color management for COM objects, Progress provides techniques that work with or without the Progress color table.
Progress provides three ways to obtain a color value to set colors for a COM object:
To use a color value from another COM object, simply assign the color value returned by one of its properties or methods to a color property or as a method parameter of your Automation object or ActiveX control.
To use the GET-RGB-VALUE( ) method, pass it an index to a color stored in the Progress color table and the method returns an integer that represents the RGB value of the specified color. You can then assign this value to a COM object color property:
This example assigns the RGB value of color number 5 from the color table to the BorderColor property of myObject.
To use the RGB-VALUE function, you pass the function three color values between 0 and 255 and it returns a single RGB value that represents the color:
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |