createFont

createFont(fontName:                           StringUtf8;
           pointSize:                          Real;
           bold, italic, strikeout, underline: Boolean);

The createFont method of the JadeDotNetType class is a helper method that enables you to create a .NET Font object from the System.Drawing.dll assembly if that type has not been imported into JADE; for example, if an assembly contains a class in .NET called Basic and the class has a setFont method that requires a Font object as a parameter, a Basic class with a setFont method is created when the assembly is imported into JADE. However, the Font type is not imported because it is not specific to the assembly.

The parameter to the setFont method in JADE is of the generic JadeDotNetType type.

The following method shows the use of the createFont method.

vars
    b : Basic;                          // Subclass of JadeDotNetType
    f : JadeDotNetType;                 // To represent a Font object
begin
    // Create a JADE instance of the class representing the .NET object
    create b transient;
    b.createDotNetObject;
    // Use the helper method to make a Font object (10 pt Arial bold)
    create f transient;
    f.createFont("Arial", 10, true, false, false, false);
    // Use the Font object as a parameter to the setFont method
    b.setFont(f);
epilog
    delete b;
    delete f;
end;