H hbqhwjj Unregistered / Unconfirmed GUEST, unregistred user! 2009-05-08 #1 一个RichEdit控件固定宽度,初始高度为一行的高度,如何做到输入字符满行换行时让RichEdit自动增加一行的高度?
Z znxia Unregistered / Unconfirmed GUEST, unregistred user! 2009-05-08 #2 procedure TForm1.RichEdit1Change(Sender: TObject);var C:Integer;begin C:=RichEdit1.Lines.Count+1; RichEdit1.Height:= self.Canvas.TextHeight('A')*C+10;end;
procedure TForm1.RichEdit1Change(Sender: TObject);var C:Integer;begin C:=RichEdit1.Lines.Count+1; RichEdit1.Height:= self.Canvas.TextHeight('A')*C+10;end;
H hbqhwjj Unregistered / Unconfirmed GUEST, unregistred user! 2009-05-13 #3 为什么我每次输入第一个字符,RichEdit就自动增加高度?
A atsen Unregistered / Unconfirmed GUEST, unregistred user! 2009-08-31 #4 C:=RichEdit1.Lines.Count+1;//这里不用加一吧