当前位置: 代码迷 >> PB >> PB大神~
  详细解决方案

PB大神~

热度:157   发布时间:2016-04-29 05:31:25.0
求助PB大神~~
Powerbuilder中,想把用户窗口的标题变成滚动的,要怎么做?求助~~

------解决方案--------------------
Powerbuilder中,想把用户窗口的标题变成滚动的,要怎么做?求助~~

在窗口的open事件里写代码

this.title = '测试跑马灯效果,请注意。。。。。。。'
timer(1)

在窗口的timer里写代码,

this.title = mid(this.title, 2) + left(this.title, 1)

试试
------解决方案--------------------
引用:
Powerbuilder中,想把用户窗口的标题变成滚动的,要怎么做?求助~~

在窗口的open事件里写代码

this.title = '测试跑马灯效果,请注意。。。。。。。'
timer(1)

在窗口的timer里写代码,

this.title = mid(this.title, 2) + left(this.title, 1)

试试


如果title的内容全是中文,那么在窗口的timer里写代码,应该是
this.title = mid(this.title, 3) + left(this.title, 2)
不然中文会乱码
------解决方案--------------------
引用:
Quote: 引用:

Powerbuilder中,想把用户窗口的标题变成滚动的,要怎么做?求助~~

在窗口的open事件里写代码

this.title = '测试跑马灯效果,请注意。。。。。。。'
timer(1)

在窗口的timer里写代码,

this.title = mid(this.title, 2) + left(this.title, 1)

试试


如果title的内容全是中文,那么在窗口的timer里写代码,应该是
this.title = mid(this.title, 3) + left(this.title, 2)
不然中文会乱码


兄弟,如果又有中文又有汉字呢?

pb10以后的版本都是unicode的,用mid和left不会截取半个汉字的
------解决方案--------------------
3楼正解。PB9以后的绝对没问题
  相关解决方案