Apice and pedice
I want to know if is possible to write special text format in a report.
I talk about chemical formula simbols for "pedice" and "apice" numbers.
For example "H2o", with the number 2 a little bit more down than the oder caratters.
I don't know the english traslation of words "apice" and "pedice", sorry.
Thanks a lot. Giacomo.
I talk about chemical formula simbols for "pedice" and "apice" numbers.
For example "H2o", with the number 2 a little bit more down than the oder caratters.
I don't know the english traslation of words "apice" and "pedice", sorry.
Thanks a lot. Giacomo.
Comments
As I know there is no report engine that can successfully solve the problem You throw up. (Anyway they are superscript and subscript in english if I right) But with a little workaround everything can be solved like any others in FR. So: threre is a Delphi component called ChemText that is especially developed to render chemical formulas to any TCanvas descendant with automatically placed superscripts and subscripts. It can be downloaded from the following URL: 'http://www.jh-inst.cas.cz/~spanel/DOWNLD/Chemtxt.zip'. In FR You can put an TFRPictureView object and leave it empty. In the report component's OnBeforePrint event handler (on Delphi level) examine the passed TFRView parameter for being the desired image component. If it is then create a TBitmap instance set its appropriate properties (Brush.Color, Font.....), fill its canvas with FillRect, and then render the desired chemical formula with the aid of the above component on the TBitmap instance's canvas. After the rendering assig the bitmap instance to the pictureview component. This way You can write a function that will return a TBitmap instance with the rendered formula on it based on input parameters (the formula, font, etc) and it can be assigned to the pictureview component. If You need code write here.
Regards:Alex
ChemText works very fine!