PB生成的树

bedsb 2017-03-15 01:38:38
PB生成的树的结构,能够类似资源管理器的时候,,把节点拖拽,放在任意的分支上?有没有类似例子代码?
...全文
835 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
bedsb 2017-03-20
  • 打赏
  • 举报
回复
我拖动的时候没有效果,是不是树的那个属性还要设置?
bedsb 2017-03-17
  • 打赏
  • 举报
回复
我直接复制过去,调试就可以?
WorldMobile 2017-03-17
  • 打赏
  • 举报
回复
引用 4 楼 bedsb的回复:
gf_writeerrors(),of_changecode 这个2个函数能不能粘出啦
直接屏幕掉,这段代码是让你参考的,不是能直接实现你的功能
bedsb 2017-03-17
  • 打赏
  • 举报
回复
gf_writeerrors(),of_changecode 这个2个函数能不能粘出啦
WorldMobile 2017-03-16
  • 打赏
  • 举报
回复
可参考代码如下 在dragdrop事件中: Long ll_NewItem TreeViewItem ltvi_Target//目标 TreeViewItem ltvi_Source//源 TreeViewItem ltvi_Parent//父节点 TreeViewItem ltvi_New dec lc_id dec lc_pid string ls_sql If GetItem(il_DropTarget, ltvi_Target) = -1 Then Return If GetItem(il_DragSource, ltvi_Source) = -1 Then Return lc_id = dec( ltvi_Source.data ) lc_pid = dec ( ltvi_Target.data ) SetDropHighlight(0) GetItem(il_DragParent, ltvi_Parent) If messagebox( "","您确定移动 " + & ltvi_Source.Label + " 从 " + ltvi_Parent.label + " 到 " + ltvi_Target.label + & "?", Question!, YesNo!,1) = 2 Then Return ls_sql = "update " + is_tablename + & " set pid = " + string( lc_pid ) + & ",operator = " + string( gc_userid ) + & " where id = " + string( lc_id ) execute immediate :ls_sql; ////messagebox("",ls_sql) //update sys_org //set pid =:lc_pid //where id = :lc_id using sqlca; if sqlca.sqlcode <> 0 then rollback; messagebox( "","更新机构失败!9" +sqlca.sqlerrtext,stopsign!) gf_writeerrors() return else // commit; long res res = parent.of_changecode(lc_id,lc_pid) if res <> -1 then commit; DeleteItem(il_DragSource) SetNull(ltvi_Source.ItemHandle) ltvi_New.data = ltvi_Source.data ltvi_New.label = ltvi_Source.label ltvi_New.pictureindex = ltvi_Source.pictureindex ltvi_New.selectedpictureindex = ltvi_Source.selectedpictureindex ltvi_New.children = ltvi_Source.children ll_NewItem = InsertItemSort(il_DropTarget, ltvi_New) SelectItem(ll_NewItem) else rollback; messagebox( "","更新机构失败!",stopsign!) gf_writeerrors() return end if end if
WorldMobile 2017-03-16
  • 打赏
  • 举报
回复
可以实现拖动,但需要自己写代码

1,072

社区成员

发帖
与我相关
我的任务
社区描述
PowerBuilder 相关问题讨论
社区管理员
  • 基础类社区
  • WorldMobile
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧