• Delphi XE2 之 FireMonkey 入门(7) TText 与 TFont



    TText 也是从 TShape(TControl -> TShape)继承;

    而与之类似的 TLabel 的继承序列是 TControl -> TStyledControl -> TTextControl -> TLabel.

    TText 的主要成员:
    { 属性 }
    Text          : string;     //文本内容
    Font          : TFont;      //字体
    Fill          : TBrush;     //文本画刷
    HorzTextAlign : TTextAlign; //横向对齐
    VertTextAlign : TTextAlign; //纵向对齐
    AutoSize      : Boolean;    //改变控件大小以适合文本
    Stretch       : Boolean;    //拉伸文本以适合控件
    WordWrap      : Boolean;    //是否换行
    
    { 方法 }
    Realign; //重新对齐
    


    TFont(来自 FMX.Types) 的主要成员:
    { 属性 }
    Family : TFontName;   //名称
    Size   : Single;      //大小
    Style  : TFontStyles; //样式
    


    procedure TForm1.FormCreate(Sender: TObject);
    begin
      Text1.Align := TAlignLayout.alClient;
    
      Text1.Text := ' Delphi XE2 ';
    
      Text1.Font.Family := '微软雅黑';
      Text1.Font.Size := 32;
      Text1.Font.Style := [TFontStyle.fsBold, TFontStyle.fsUnderline];
    
      Text1.Fill.Color := claRed;
      Text1.Stretch := True;
    end;
    

  • 相关阅读:
    解决uniapp中app.vue的onlaunch不能跳转页面问题
    参数校验注解,备用
    码云推送项目总是没有权限
    一句话解释回调函数
    动态管理
    转:用jupyter notebook打开指定目录下的.ipynb文件
    gcn变体
    图4
    节点分类
    图3
  • 原文地址:https://www.cnblogs.com/del/p/2185341.html
Copyright © 2020-2023  润新知