您好,我想將以下腳本框滾動到末尾,以便最後寫入的字串始終可見。
w=new window("a", sb=script box());
for (i=1, i<=100, i++,
sb<<APPEND text=""></APPEND> // I would like to set a scroll to end here, so that the last written string is visible.<BR />);透過檢查顯示框樹,我看到腳本框周圍自動創建了一個“滾動框”,但我還沒有找到訪問它的方法。
有什麼建議嗎?
謝謝
馬泰奧
對於腳本框,您可以使用設定行轉到特定行
Names Default To Here(1);
w = New Window("a", sb = Script Box());
maxcount = 100;
For(i = 1, i <= maxcount, i++,
sb << append text(Char(i) || "\!N"); // I would like to set a scroll to end here, so that the last written string is visible.
);
lines = sb << get lines;
sb << Set Line Text(N Items(lines), Char(lines[N Items(lines)]));
包裹腳本框的滾動框似乎是某種奇怪的滾動框(它仍然是腳本框..)
Names Default To Here(1);
nw = New Window("a", sb = Script Box());
maxcount = 100;
For(i = 1, i < maxcount, i++,
sb << append text(Char(i) || "\!N"); // I would like to set a scroll to end here, so that the last written string is visible.
);
scroll = nw[ScrollBox(1)];
Show(scroll << Class Name);