要怎么设置打印时输入字段在一定的个数后要换行,这个要在那里写事件呀?是不是在onneeddata,
如:地址
厦门市********************地方******
太长了,
现要像
厦门市********************
地方******
还有要怎么设置日期如取系统时间再加7天,
如:地址
厦门市********************地方******
太长了,
现要像
厦门市********************
地方******
还有要怎么设置日期如取系统时间再加7天,
解决方案 »
- 《Delphi 2006年8月 专家排行榜》页面有病毒
- 找TreeView的应用事例.UP有分
- 两台电脑,一用猫上网,一用宽带。如何通过我的程序使他们互相获取对方的IP地址?
- TcpClient控件无法接收Server端发来的数据\TCPClient的OnReceive事件不被触发
- 如何用代码实现radiogroup的某个item被选中?
- 安装好的DELPHI6中在Data Access选项卡上怎么找不到数据表控件(table)
- 窗口最小化时....
- 关于SQL语句结果集的调用问题
- BDE代码转换ADO代码(在线等待)
- 忘各位告知:ADO连接请问怎样让所有的DB组件禁用....如果禁用ADOTABLE1.????...如果是取消禁止那..
- 关于在delphi中调用存储过程得问题
- 一个困扰我的数据连接问题
if m < 10 then
m := '0'+ inttostr(m);
if d < 10 then
d := '0'+ inttostr(d);lbldate.Caption := inttostr(y)+'年'+inttostr(m)+'月'+inttostr(d)+'日'
var
iLen : integer;
strSource, strTemp : string;
begin
if Length(Value)<=TCustomControl(Sender).Width/7 then exit;
strSource:=Value;
Value:='';
while true do
begin
iLen:=1;
while iLen<TCustomControl(Sender).Width/7 do
begin
if ord(strSource[iLen])>126 then //這里的值在簡體下好像要改為其它的﹐不是很清楚(我在繁體下測試正常通過)
inc(iLen,2)
else
inc(iLen);
end;
dec(iLen);
if ord(strSource[iLen-1])>126 then
dec(iLen,2);
strTemp:=Copy(strSource,1,iLen); if Value='' then
Value:=Trim(strTemp)
else
begin
Value:=Trim(Value+#13+strTemp);
end;
Delete(strSource,1,iLen);
if Length(strSource)<=TCustomControl(Sender).Width/7 then
begin
Value:=Trim(Value+#13+strSource);
exit;
end;
end;
end;
很管用,非常感谢其中,7是不是控制一行显示多少个字用的?