Dobrý den,
chtěl bych poprosit o radu s vytvořenou komponentou MujShape odvozenou od Shape. V MujShape mám deklarované textové proměnné, do kterých ukládám
řetězce, to funguje. Nicméně bych v určitých případech potřeboval za běhu měnit orientaci na výšku. Nepodařilo se mě dostat do properties Font.orienattion, tak
aby ta orientace fungovala. Zkoušel jsem to i s interposerem, ale taky bez úspěchu. Jde tento problém řešit u této komponenty nebo bude lepší použít jinou?
Děkuji mnohokrát.
...
type
TMujShape = class(TShape)
.....
{ Published declarations }
property TextVyska: string read...
property TextSirka: string read...
implementation
{ TMujShape }
procedure TMujShape.Paint;
var FTextvyska: Integer;
FTextsirka: Integer;
// lf: LOGFONT; // Windows native font structure
begin
...
Canvas.TextOut(
(Width - Canvas.TextWidth(FText)) div 2,
(Height - Canvas.TextHeight(FText)) div 2, FText);
Canvas.TextOut(
(Width - Canvas.TextWidth(FText2)) div 2,
((Height - Canvas.TextHeight(FText2)) div 2)+20, FText2);
....
end;
....