richview问题

xinghuang 2004-10-10 11:21:54
我用的是richview1.8版本,如何在页脚中设置页码,这个问题挺急的,希望各位能尽快给予帮忙。
...全文
320 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
newhxsir 2004-10-21
  • 打赏
  • 举报
回复
没有得到自己想要的答案,只好自己收分了。
xinghuang 2004-10-20
  • 打赏
  • 举报
回复
只有dcu文件,没有pas文件
longtusoft 2004-10-17
  • 打赏
  • 举报
回复
把你那个控件源码发来吧,帮你看看.
xinghuang 2004-10-17
  • 打赏
  • 举报
回复
to liu925(liu):老兄,是RichViewEdit呀,你给的是RichEdit,差远啦
xinghuang 2004-10-14
  • 打赏
  • 举报
回复
liu925 2004-10-14
  • 打赏
  • 举报
回复
算你走运!
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, RichEdit;
type
TForm1 = class(TForm)
RichEdit1: TRichEdit;
Button1: TButton;

procedure Button1Click(Sender: TObject);

private
procedure SetSubscript(ARichEdit: TCustomRichEdit; Sub, ASize: Integer);

{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}
procedure TForm1.SetSubscript(ARichEdit: TCustomRichEdit; Sub, ASize: Integer);
//Sub: 0:无 1:上标 -1:下标
var
Format: TCharFormat;
procedure InitFormat(var Format: TCharFormat);
begin
FillChar(Format, SizeOf(TCharFormat), 0);
Format.cbSize := SizeOf(TCharFormat);
end;
procedure SetAttributes(var Format: TCharFormat);
begin
if ARichEdit.HandleAllocated then
SendMessage(ARichEdit.Handle, EM_SETCHARFORMAT, SCF_SELECTION, LPARAM(@Format))
end;
begin
InitFormat(Format);
with Format do
case Sub of
0:
begin
dwMask := Integer(CFM_OFFSET + CFM_SIZE);
yHeight := ASize * 20;
Format.yOffset := 0;
end;
1:
begin
dwMask := Integer(CFM_OFFSET + CFM_SIZE);
yHeight := ASize * 2 div 3 * 20;
Format.yOffset := ASize div 4 * 20;
end;
-1:
begin
dwMask := Integer(CFM_OFFSET + CFM_SIZE);
yHeight := ASize * 2 div 3 * 20;
Format.yOffset := -ASize div 4 * 20;
end;
else
Exit;
end;
SetAttributes(Format);
end;



procedure TForm1.Button1Click(Sender: TObject);
begin

SetSubscript(RichEdit1, -1, 12);
end;
zzn007 2004-10-12
  • 打赏
  • 举报
回复
这是什么控件?不知道
顶顶看吧
yueyixing 2004-10-12
  • 打赏
  • 举报
回复
没用过,ding
xinghuang 2004-10-12
  • 打赏
  • 举报
回复
唉,自己也顶一下
darkliu 2004-10-11
  • 打赏
  • 举报
回复
不知道,帮忙顶
zwb666 2004-10-11
  • 打赏
  • 举报
回复
ding
xinghuang 2004-10-11
  • 打赏
  • 举报
回复
都没人知道吗

5,386

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧