当前位置: 动力学知识库 > 问答 > 编程问答 >

powerbuilder - Change treeview scroll position thru PowerScript

问题描述:

How can I change Treeview Scroll Position thru PowerScript?

Im thinking to synchronize Scroll position of a datawindow and treeview but I cant seem to get it to work.

Thanks!

网友答案:

You'll have to use the send() command using a handle to the treeview, the event id (vscroll = 277), a flag to tell it HOW to scroll (up one line, down one line, up a page, down a page, etc), and then one more long value which is an identifier for a string or message (not used here)

So, to scroll up one line you would use:

Send(Handle(tv_1), 277, 0, 0)

and to scroll down one line, you would use:

Send(Handle(tv_1), 277, 1, 0)

Then use the datawindow's scrollvertical event to keep them in sync.

Hope that helps.

分享给朋友:
您可能感兴趣的文章:
随机阅读: