可用
form1.Edit1.Text:=Label1.Font.Name;
form1.Edit2.Text:=inttostr(Label1.Font.size);
显示字体名称和字号大小
但如何显示字体颜色的名称(如:#FFFFFF)和文字效果名称(如:粗体,下划线等)

解决方案 »

  1.   

    floattostr(color)if fsbold in bitbtn1.Font.style thenif fsunderline in bitbtn1.Font.style then
      

  2.   

    Edit3.Text := ColorToString(Edit1.Color);
      

  3.   

    文字效果名称
      if fsbold in label1.Font.Style then
        showmessage('粗体');
    但是颜色应该不是每个都有名称吧
      

  4.   

    EDIT1.Text:=INTTOSTR(FORM1.Font.Color);
      EDIT1.Text:=ColorToString(FORM1.Font.Color);
      IF (FSBOLD IN FORM1.Font.Style) THEN SHOWMESSAGE('粗体');
      IF (FSUNDERLINE IN FORM1.Font.Style) THEN SHOWMESSAGE('下划线');