delphi 如何判断richedit有多少个字符
3个回答
展开全部
====================================================================
RichEdit调整页面内容显示位置
====================================================================
procedure TForm1.MemoRichEditResize;
var
rect1: TRect;
begin
SendMessage(RichEdit1.Handle, Em_Getrect, 0, Longint(@Rect1));
Rect1.Left :=28;
Rect1.Top := 8;
Rect1.Right:='这里是你的10个字体的宽';
Rect1.Bottom:=RichEdit1.Height-8;
SendMessage(RichEdit1.Handle, Em_SETrect, 0, Longint(@rect1));
end;
procedure TForm1.FormResize(Sender: TObject);
begin
MemoRichEditResize;
end;
RichEdit调整页面内容显示位置
====================================================================
procedure TForm1.MemoRichEditResize;
var
rect1: TRect;
begin
SendMessage(RichEdit1.Handle, Em_Getrect, 0, Longint(@Rect1));
Rect1.Left :=28;
Rect1.Top := 8;
Rect1.Right:='这里是你的10个字体的宽';
Rect1.Bottom:=RichEdit1.Height-8;
SendMessage(RichEdit1.Handle, Em_SETrect, 0, Longint(@rect1));
end;
procedure TForm1.FormResize(Sender: TObject);
begin
MemoRichEditResize;
end;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
xx: string ;
xx := '' ;
for i := o to richedit1.lines.count -1 do begin
xx := xx + richedit1.Lines[i].string ;
end;
length(xx)
xx := '' ;
for i := o to richedit1.lines.count -1 do begin
xx := xx + richedit1.Lines[i].string ;
end;
length(xx)
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
length(richedit1.Lines.Text)
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询