CHEMTEXT This is a useful collection of components and procedures to display chemical formulas and equations with automatically placed subscripts and superscripts. The procedure ChemTextOut draws the chemical text onto any Canvas object (useful for writing event handlers for user drawn Lists and Grids). This procedure is used by the components TChemLabel and TDBChemText to display chemical formulas on the forms. The code included is original work of the author. Files: ChemReg.pas ChemReg.dcr Instalable components for Win32 (Delphi 2 and 3). Chem1Reg.pas Chem1Ref.dcr Instalable components for Delphi 1. ChemTxt.pas A unit containing procedure ChemTextOut(Canvas:TCanvas; const aRect:TRect; X,Y:integer; text:String); This can be used in an event handler, for example in OnDrawDataCell of DBGrid1: procedure TForm1.DBGrid1DrawDataCell(Sender: TObject; const Rect: TRect; Field: TField; State: TGridDrawState); begin if Assigned(Field) then ChemTextOut((Sender as TDBGrid).Canvas, Rect, Rect.Left, Rect.Top, Field.DisplayText); end; Prague 1998, Patrik Spanel. mailto:Patrik.Spanel@jh-inst.cas.cz http://www.jh-inst.cas.cz/~spanel