re: How to obtain TppMemo Height after assigned with TStringList?
Hi
I have encounter this but not sure if this is a bug.
I did the following in sequence:-
1. Assign StringList to TppMemo control
2. Check TppMemo.Height but the value remains the same. TppMemo.Stretch is
set to true.
I am using RB 7.03. Please advise.
Best regards
Raymond
I have encounter this but not sure if this is a bug.
I did the following in sequence:-
1. Assign StringList to TppMemo control
2. Check TppMemo.Height but the value remains the same. TppMemo.Stretch is
set to true.
I am using RB 7.03. Please advise.
Best regards
Raymond
This discussion has been closed.
Comments
Before assign StringList to TppMemo the height property is 0.15333. After
assign StringList tp TppMemo.Lines "height" property is still having same
value. How can I obtain new "height" value?
The height of the actual component will remain the same regardless if it
stretches or not. If you need to find the height of the stretched component
you will need to look at the height of the actual draw command that is drawn
to the device canvas. This can be done inside the OnDrawCommandCreate
event. Note that this measurement will be in microns so the proper
conversions will need to be made. See the ppFromMMThousandths method
located in the ppUtils.pas file.
uses
ppDrwCmd;
procedure TForm1.ppMemo1DrawCommandCreate(Sender, aDrawCommand: TObject);
begin
FMemoHeight := TppDrawText(aDrawCommand).Height;
end;
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com