Simple_Application_Framework_for_VCL[11]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 zblue78 的 blog

summary

during this step, we have created the base list module for our application framework.

here is the link to the source code of the application written in delphi. it contains an additional module derived from the base grid module. you should have the developer express expressnavbar control, expressbars and expressquantumgrid libraries installed in your environment to be able to compile and run the application.

add printing capability into the application framework

the last feature that we will add into our application framework is a printing capability. we will introduce print actions and implement them in the base module in the same way as we did for export actions.

after adding print actions support into custommodule, we will have three additional protected virtual methods: hasprinting, doprint and dopreview.

these methods are overridden in customgridmodule to add the ability to print the expressquantumgrid. drop a tdxcomponentprinter component from the expressprinting library on the customgridmodule and create a report link for the grid located on the module. with this, introducing print support for customgridmodule is a very easy task.

[delphi]

// returns true if the module supports printing 
function tfrmcustomgridmodule.hasprinting: boolean;
begin 
  result := true;
end;

procedure tfrmcustomgridmodule.doprint;
begin 
  printerlinkgrid.print(false, nil);
end;

procedure tfrmcustomgridmodule.dopreview;
begin 
  printerlinkgrid.preview(true);
end;

summary

with this step, we have introduced print support into the application framework and we implemented it for the base grid module.

here is the link to the source code of the application written in delphi. you should have the developer express expressnavbar control, expresprinting, expressbars and expressquantumgrid libraries installed in your environment to be able to compile and run this demo.

本文关键:Simple_Application_Framework_for_VCL
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top