Const
QRUnitDesc:Array[TQRUnit] of String=('MM', 'Inches', 'Pixels', 'Characters', 'Native');
QRUnitDesc:Array[TQRUnit] of String=('MM', 'Inches', 'Pixels', 'Characters', 'Native');
procedure TForm1.Button1Click(Sender: TObject);
var iUnit:TQRUnit;
begin
//Page Units
ShowMessage(QRUnitDesc[QuickRep1.Page.Units]);
ShowMessage(QRUnitDesc[QuickRep1.Page.Units]);
// List
for iUnit := Low(QRUnitDesc) to High(QRUnitDesc) do
begin
ShowMessage(QRUnitDesc[iUnit]);
end;
end;
----
Uses TypInfo;
procedure TForm1.Button1Click(Sender: TObject);
var sEnumName:String;
begin
sEnumName := GetEnumName(TypeInfo(TFieldType), Integer(ftString));
ShowMessage(sEnumName);
end;
沒有留言:
張貼留言