PowerBuilder 跑马灯

1、建一个文本控件,命名为sle_text
2、窗体open事件代码如下:

sle_text.text="一种花叫满天星,它的花语是:我甘愿做你的配角,满着所有人继续爱你,我携满天星辰以赠你,仍觉满天星辰不及你。"
Timer(0.2)

3、窗口的Timer事件代码如下:
注意:如果在PB9代码用Mid,Left函数截取中的话是会乱码的,所有用MidW,LeftW函数截取;PB9以上的版本使用Mid,Left即可

sle_text.text=Midw(sle_text.text,(1+1))+Leftw(sle_text.text,1)
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
$PBExportComments$用数据窗口做跑马灯 release 7; datawindow(units=1 timer_interval=10 color=15780518 processing=0 HTMLDW=no print.documentname="" print.orientation = 0 print.margin.left = 24 print.margin.right = 24 print.margin.top = 24 print.margin.bottom = 24 print.paper.source = 0 print.paper.size = 0 print.prompt=no print.buttons=no print.preview.buttons=no ) summary(height=0 color="536870912" ) footer(height=0 color="536870912" ) detail(height=87 color="536870912" ) table(column=(type=char(10) updatewhereclause=yes name=s dbname="s" ) ) text(band=header alignment="1" text="S:" border="0" color="0" x="13" y="6" height="14" width="18" name=s_t font.face="宋体" font.height="-9" font.weight="400" font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" ) column(band=detail id=1 alignment="0" tabsequence=10 border="0" color="0" x="2" y="32" height="1" width="16" format="[general]" name=s edit.limit=0 edit.case=any edit.focusrectangle=no edit.autoselect=yes edit.autohscroll=yes font.face="宋体" font.height="-9" font.weight="400" font.family="0" font.pitch="2" font.charset="134" background.mode="1" background.color="536870912" ) text(band=detail alignment="0" text="现在跑马灯可以用了!" border="0" color="8421376" x="0~t333 - (long(left(right(string(t),4),3))) /1.5" y="0" height="33" width="279" name=t_1 font.face="Arial" font.height="-20" font.weight="700" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" ) compute(band=summary alignment="0" expression="left(string(cpu()) + string(today(),'yyyymmdd'),len(string(cpu()) + string(today(),'yyyymmdd')) -8)"border="0" color="0" x="43" y="11" height="19" width="371" format="[general]" name=t visible="1~t0" font.face="Arial" font.height="-12" font.weight="400" font.family="2" font.pitch="2" font.charset="0" background.mode="2" background.color="16777215" ) text(band=detail alignment="0" text="/*truncate((long(left(right(string(t),4),3)) /50),0) * 50* (rgb(255,255,255) /1000)*/rand(100)/100 * rgb(255,255,255)" border="0" color="16711935" x="1" y="44" height="14" width="1418" name=t_2 font.face="Arial" font.height="-8" font.weight="700" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" ) text(band=detail alignment="0" text="333 - (long(left(right(string(t),4),3))) /1.5" border="0" color="16711935" x="0" y="66" height="14" width="508" name=t_3 font.face="Arial" font.height="-8" font.weight="700" font.family="2" font.pitch="2" font.charset="0" background.mode="1" background.color="553648127" ) htmltable(border="1" ) htmlgen(clientevents="1" clientvalidation="1" clientcomputedfields="1" clientformatting="0" clientscriptable="0" generatejavascript="1" )
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值