开发者

PowerBuilder - TreeViewItem issue

开发者 https://www.devze.com 2023-03-16 01:48 出处:网络
I am using PB 10.5 How can I hide the expand symbol (+) in a TreeViewItem object (if the node h开发者_运维知识库as not subnodes)???

I am using PB 10.5

How can I hide the expand symbol (+) in a TreeViewItem object (if the node h开发者_运维知识库as not subnodes)???

Thank you!


I found the solution so fast. You have to modify the 'Children' property, just like this:

treeviewitem my_tvi

if Not IsValid(ids_childrens) then
    ids_childrens = CREATE datastore
    ids_childrens.DataObject = 'my_dw'
    ids_childrens.SetTransObject(SQLCA)
end if
num_children = ids_childrens.Retrieve(long(some_pk))
if num_children <= 0 then
    my_tvi.children = false
else
    my_tvi.children = true          
end if
0

精彩评论

暂无评论...
验证码 换一张
取 消