翻譯|使用教程|編輯:楊鵬連|2021-06-23 09:50:09.710|閱讀 253 次
概述:本文介紹了FastReport VCL報表如何顯示樣式集列表以及所選樣式的應用、修改/添加/刪除樣式集、保存和加載樣式庫的詳細教程。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
FastReport VCL是用于 Delphi、C++ Builder、RAD Studio 和 Lazarus 的報告和文檔創建 VCL 庫。它提供了可視化模板設計器,可以訪問 30 多種格式,并可以部署到云、網站、電子郵件和打印中。
顯示樣式集列表以及所選樣式的應用
樣式庫經常用于在諸如“ComboBox”或“ListBox”之類的控件中顯示可訪問的樣式集。之后,由用戶選擇的集合應用于報告。
顯示列表:
StyleSheet.GetList(ComboBox1.Items);將所選集用于報告:
frxReport1.Styles := StyleSheet.Items[ComboBox1.ItemIndex];或者
frxReport1.Styles := StyleSheet.Find[ComboBox1.Text];修改/添加/刪除樣式集
修改具有指定名稱的集合:
var Styles: TfrxStyles; StyleSheet: TfrxStyleSheet; { search for the required set } Styles := StyleSheet.Find('Styles2'); { modify a style with the Style1 name from the found set } with Styles.Find('Style1') do Font.Name := 'Arial Black';將集合添加到庫:
var Styles: TfrxStyles; StyleSheet: TfrxStyleSheet; { the third set } Styles := StyleSheet.Add; Styles.Name := 'Styles3';從庫中刪除一個集合:
var i: Integer; StyleSheet: TfrxStyleSheet; { search for the third set } i := StyleSheet.IndexOf('Styles3'); { if find, delete } if i <> -1 then StyleSheet.Delete(i);保存和加載樣式庫
樣式庫的文件擴展名默認為“FSS”。
var StyleSheet: TfrxStyleSheet; StyleSheet.SaveToFile('c:\1.fss'); StyleSheet.LoadFromFile('c:\1.fss');
如果您對FastReport 動物,歡迎加入FastReport QQ 交流群:702295239
還想要更多嗎?您可以點擊閱讀【FastReport報表2021最新資源盤點】,查找需要的教程資源。上是FastReport .NET正在慧都網火熱銷售中!>>查看價格詳情
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自: