Thread Rating:
  • 211 Vote(s) - 2.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
複数のツリー表示について
06-11-2014, 06:25 PM,
#6
RE: 複数のツリー表示について
「開いているかどうか」は、TreeItem で取得できるようですね。

Code:
{value
    let tree:TreeControl={TreeControl data-model = tree_model}
    {VBox
        tree,
        {CommandButton
            label = "選択ノードの状態",
            takes-focus? = false,
            {on Action do

                def tc-ui = tree.ui-object asa SkinnableTreeControlUI


                {if-non-null crr-node = tree.current-node then

||++                || SkinnableTreeControlUI.cells からも取れるみたいだが、面倒
||++                || SkinnableTreeControlUI.get-item-for-node のほうが楽
||++                let current-item:#TreeItem = null
||++                {for c in tc-ui.cells do
||++                    def itm = c.item
||++                    {if itm.current? then
||++                        set current-item = itm
||++                        {break}
||++                    }
||++                }

                    {if-non-null current-item=  {tc-ui.get-item-for-node crr-node} then
                        {if current-item.expanded? then
                            {popup-message "開いている"}
                         else
                            {popup-message "閉じている"}
                        }
                    }
                 else
                    {popup-message "現在選択ノードなし"}
                }
            }
        }
    }
}
Reply


Messages In This Thread
複数のツリー表示について - by rom - 06-09-2014, 04:36 PM
RE: 複数のツリー表示について - by rom - 06-11-2014, 03:02 PM
RE: 複数のツリー表示について - by umemura - 06-11-2014, 06:25 PM
RE: 複数のツリー表示について - by rom - 06-12-2014, 10:54 AM
Forum Jump:


Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('1093')