Developer's reference PB2XLS for PowerBuilder

Reference > N_XLS_FORMAT > of_copy

of_copy() method

Copy all of the properties from one Format object to another

Syntax

format.of_copy ( src_format )

Parameters

src_formatn_xls_format object which is copied

Return value

Integer. Returns 1 if it succeeds and -1 if an error occurs.

Description

This is not a copy constructor, both objects must exist prior to copying.

Examples

format1 = workbook.of_add_format (  )
format1.of_set_font ( 'Times New Roman' ) 
format1.of_set_size ( 20 ) 
format1.of_set_bold ( true ) 
format2 = workbook.of_add_format (  )
format2.of_copy ( format1 )   //format2 is bold, Times New Roman, 20