1
2
3
|
protected
override
bool
ShowWithoutActivation {
get
{
return
true
; }
}
|
1
2
3
4
5
6
7
8
|
protected
override
CreateParams CreateParams {
get
{
const
int
WS_EX_NOACTIVATE = 0x08000000;
CreateParams p =
base
.CreateParams;
p.ExStyle |= WS_EX_NOACTIVATE;
return
p;
}
}
|
1
2
3
4
5
6
7
8
|
protected
override
void
DefWndProc(
ref
Message m) {
const
int
WM_MOUSEACTIVATE = 0x21;
const
int
MA_NOACTIVATE = 0x0003;
if
(m.Msg == WM_MOUSEACTIVATE)
m.Result = (IntPtr)MA_NOACTIVATE;
else
base
.DefWndProc(
ref
m);
}
|
1
2
3
4
5
6
7
8
9
|
public
void
Add(ComboTreeNode item) {
innerList.Add(item);
item.Parent = node;
// changes in the subtree will fire the event on the parent
item.Nodes.CollectionChanged +=
this
.CollectionChanged;
OnCollectionChanged(
new
NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, item)
);
}
|
1
2
3
4
5
6
7
8
9
10
11
|
internal
bool
IsNodeVisible(ComboTreeNode node) {
bool
displayed =
true
;
ComboTreeNode parent = node;
while
((parent = parent.Parent) !=
null
) {
if
(!parent.Expanded) {
displayed =
false
;
break
;
}
}
return
displayed;
}
|