Thread Rating:
  • 326 Vote(s) - 2.74 Average
  • 1
  • 2
  • 3
  • 4
  • 5
複数のツリー表示について
06-11-2014, 01:20 PM, (This post was last modified: 06-11-2014, 01:32 PM by umemura.)
#3
RE: 複数のツリー表示について
PointerRelease だと、ツリーの操作をマウス以外で行った場合に対応できないので、
選択を外す際のイベントは、フォーカスイベントにしたほうがよいかもしれません。

また、要件次第だとは思いますが、選択状態を残したいのであれば、
フォーカス状態に応じて「選択色」を変更する、という方法もあります。
この方法なら、コントロール間の制御も必要ないですしね。

Code:
    ||フォーカスアウト時に、選択色を灰色に
    ||フォーカスイン時に、選択色を戻す
{do

        {tree1.add-event-handler
            {on e:FocusOut at tc:TreeControl do
                set tc.selected-background = "darkgray"
                set tc.selected-color = "black"
            }
        }
        {tree2.add-event-handler
            {on e:FocusOut at tc:TreeControl do
                set tc.selected-background = "darkgray"
                set tc.selected-color = "black"
            }
        }
        {tree1.add-event-handler
            {on e:FocusIn at tc:TreeControl do
                {unset tc.selected-background }
                {unset tc.selected-color }
            }
        }
        {tree2.add-event-handler
            {on e:FocusIn at tc:TreeControl do
                {unset tc.selected-background }
                {unset tc.selected-color }
            }
        }
    }




Messages In This Thread
複数のツリー表示について - by rom - 06-09-2014, 04:36 PM
RE: 複数のツリー表示について - by umemura - 06-11-2014, 01:20 PM
RE: 複数のツリー表示について - by rom - 06-11-2014, 03:02 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')