Author: | Eric Aling |
Accessed: | |
Download: | ( treeview.zip 3Kb ): |
When you want to drag an object into a treeview, you automatically want the treeview to scroll when needed. This little service provides this functionality.
The service is called n_cst_tvsrv_dragscroll, which is inherited from the PB nonvisual object. I have incorporated this service into my u_tv object as follows:
if IsValid(inv_DragScroll) then
inv_DragScroll.Event ue_dragwithin(handle)
end if
if ab_Switch then
if not IsValid(inv_DragScroll) then
inv_DragScroll = create n_cst_tvsrv_DragScroll inv_DragScroll.of_SetRequestor(This)
end if
else
if IsValid(inv_DragScroll) then
Destroy inv_DragScroll
end if
end if return 1
That's all there is too it. To call the service, just code this.of_DragScroll(TRUE) in the constructor event of your treeview control.
Good luck!