Creating a style library

Top  Previous  Next

The following example shows how to create a library and add two sets of styles to it.

 

Pascal:

 

var

 Styles: TfrxStyles;

 StyleSheet: TfrxStyleSheet;

 

StyleSheet := TfrxStyleSheet.Create;

 

{ the first set }

Styles := StyleSheet.Add;

Styles.Name := 'Styles1';

{ here styles can be added to the Styles set }

 

{ the second set }

Styles := StyleSheet.Add;

Styles.Name := 'Styles2';

{ here styles can be added to the Styles set }

 

C++:

 

TfrxStyles * Styles;

TfrxStyleSheet * StyleSheet;

 

StyleSheet = new TfrxStyleSheet;

 

// the first set

Styles = StyleSheet->Add();

Styles->Name = "Styles1";

//  here styles can be added to the Styles set

 

// the second set

Styles = StyleSheet->Add();

Styles->Name = "Styles2";

// here styles can be added to the Styles set