How to get BarCodeView Bounds after setting it to autosize?
I am creating a BarCodeView on Delphi at runtime and then adding it to a ReportPage on a TfrxReport.
the barcode displays just fine, but when I try to get its width I get 0 even if it is created and clearly longer than 0.
here is some code.
Page:= Report.FindObject('Page1') as TfrxReportPage;;
BarCode:= TfrxBarCodeView.Create(Page); BarCode.Name:='Codigo';
BarCode.WideBarRatio:=2;
BarCode.Zoom:=1;
BarCode Font.Size:=6;
BarCode.ShowText:= True;
BarCode.BarType:= bcCodeEAN128;
BarCode.Text:= 'Something123';
BarCode.AutoSize:=True;
BarCode.Height:= 50;
BarCode.Top:= 5;
BarCode.Left:= 5;
now, if I try to check the barcode view properties, I get 0 from it'd width property, even if I call the next:
BarCode:=Report.FindComponent('Codigo') as TfrxBarCodeView;
when showing a message like this:
ShowMessage('code width: '+BarCode.Width.ToString);
I get 0 even if the BarCodeView displays fine in the report.
any ideas how to get those properties right with the autosize enabled and creating the barcode at runtime from Delphi?
the barcode displays just fine, but when I try to get its width I get 0 even if it is created and clearly longer than 0.
here is some code.
Page:= Report.FindObject('Page1') as TfrxReportPage;;
BarCode:= TfrxBarCodeView.Create(Page); BarCode.Name:='Codigo';
BarCode.WideBarRatio:=2;
BarCode.Zoom:=1;
BarCode Font.Size:=6;
BarCode.ShowText:= True;
BarCode.BarType:= bcCodeEAN128;
BarCode.Text:= 'Something123';
BarCode.AutoSize:=True;
BarCode.Height:= 50;
BarCode.Top:= 5;
BarCode.Left:= 5;
now, if I try to check the barcode view properties, I get 0 from it'd width property, even if I call the next:
BarCode:=Report.FindComponent('Codigo') as TfrxBarCodeView;
when showing a message like this:
ShowMessage('code width: '+BarCode.Width.ToString);
I get 0 even if the BarCodeView displays fine in the report.
any ideas how to get those properties right with the autosize enabled and creating the barcode at runtime from Delphi?