CT SET FILLS ATTRIBUTES

4D - Documentation   Français   English   German   4D Chart, Command Theme List   4D Chart, Command Alphabetical List   Back   Previous   Next

version 6.0.5


CT SET FILLS ATTRIBUTES (area; objects; patterns; colors)

ParameterTypeDescription
areaLongint4D Chart area
objectsLongint arrayList of object ID numbers
patternsInteger arrayList of pattern numbers
colorsLongint arrayList of color values

Description

The CT SET FILLS ATTRIBUTES command acts the same as CT SET FILL ATTRIBUTES, except that it applies to a list of objects. In the objects parameter, you pass a long integer array containing a list of the ID numbers of objects for which you want to set fill attributes.

The patterns and colors parameters are arrays containing the corresponding attributes.

For more information, refer to the CT SET FILL ATTRIBUTES command.

Example

In this example, you have a form that contains a 4D Chart area named vct. You want to simultaneously create 100 rectangles using specific lines and patterns. Instead of calling the CT SET LINE ATTRIBUTES and CT SET FILL ATTRIBUTES commands 100 times, you fill arrays and define rectangle attributes in one call.

Here is the method for the form:

   If (Form event=On load)
      ARRAY LONGINT($ids;100)
      ARRAY INTEGER($pat;100)
       ARRAY INTEGER($pat2;100)
      ARRAY LONGINT($color;100)
      ARRAY LONGINT($color2;100)
      ARRAY LONGINT($ln;100) `or ARRAY REAL ($ln;100)
      CT SELECT (vct;-1;1)
      CT DO COMMAND (vct;2006)
      For ($i;1;100)
         $ids{$i}:=CT Draw rectangle (vCT;40+($i*10);40;40+(($i+1)*10)-2;60;0)
         $pat{$i}:=1+($i%30)
         $pat2{$i}:=1+($i%15)
         $color{$i}:=CT Index to color ($i)
         $color2{$i}:=CT Index to color (100-$i)
         $ln{$i}:=1+$i%4
      End for 
      CT SET FILL ATTRIBUTES (vct;$ids;$pat;$color)
      CT SET LINE ATTRIBUTES (vct;$ids;$pat2;$color2;$ln)
   End if 

See Also

CT SET CHART FILL ATTRIBUTES, CT SET CHART LINE ATTRIBUTES, CT SET FILLS ATTRIBUTES, CT SET LINE ATTRIBUTES.


4D - Documentation   Français   English   German   4D Chart, Command Theme List   4D Chart, Command Alphabetical List   Back   Previous   Next