Discussion:
TreeNodeの位置をPoint型で取得したい
(too old to reply)
Masato
2005-01-06 02:42:47 UTC
Permalink
$B$"$1$^$7$F$*$a$G$H$&$4$6$$$^$9!#(B
$B$3$N#M#L$OG/$,L@$1$F$bJ?OB$J$h$&$J$N$GEj9F$7$F$_$^$7$?!#(B
$B$b$79XFI$7$F$*$i$l$kJ}!"$*$i$l$^$7$?$i!"2sEz$h$m$7$/$*4j$$$7$^$9!#(B

TreeView$B%3%s%H%m!<%k$rMxMQ$7$F$$$F!"(B
TreeNode$B$N?<$5$K1~$8$F%3%s%F%-%9%H%a%K%e!<$***@Z$jBX$($?$$$H;W$C$F$$$^$9!#(B
$B$=$N:]!"%-!<%\!<%I$N%"%W%j%1!<%7%g%s%-!<(B(Keys.Apps)$B$KH?1~$7$F(B
$B%]%C%W%"%C%W$5$;$?$$$N$G$9$,!"4|BTDL$j$N>l=j$K%]%C%W%"%C%W$G$-$:$K:$$C$F$$$^$9!#(B


TreeView $B$N(B AfterSelect $B%$%Y%s%H$G!"(B
TreeView.ContextMenu $B%W%m%Q%F%#$K!"?<$5$K1~$8$F(B
$B%3%s%F%-%9%H%a%K%e!<(B (System.Windows.ContextMenu) $B$r%;%C%H$7$F$$$^$9!#(B

$B$3$l$G%"%W%j%1!<%7%g%s%-!<$G%]%C%W%"%C%W$5$l$k$h$&$K$J$j$^$7$?!#(B

$B$7$+$7!"%]%C%W%"%C%W0LCV$,(BTreeView$B%3%s%H%m!<%k$NCf1{$K$J$C$F$7$^$&$h$&$J$N$G$9!#(B

$B$=$l$G!"A*BrCf$N%N!<%I$N2#%C%A%g$K%]%C%W%"%C%W$G$-$l$P$$$$$J!"$H;W$&$N$G$9!#(B

$B$=$3$G!"(BTreeNode$B$N0LCV$r(B Point $B7?$G<hF@$9$kJ}K!$rLO:w$7$F$$$?$N$G$9$,(B
$B;d$NCN<1$G$O8B3&$KMh$^$7$?!#(B

$B$J$K$+NI$$J}K!$,$4$6$$$^$7$?$i!"65$($F$$$?$@$1$^$9$+!)(B
$B$h$m$7$/$*4j$$$7$^$9!#(B

$B"(:#$O;EJ}$J$$$N$G!"(BPoint(50,50) $B$G8GDjI=<($7$F$^$9!#!#!#(B



Masato.
Yuichiro Ochifuji
2005-01-06 15:21:32 UTC
Permalink
$BMnF#$G$9!#(B

#$B;d$O(BVB$BGI$J$N$G(BVB$B$G8!>Z$7$F$$$^$9!#(B
Post by Masato
$B$"$1$^$7$F$*$a$G$H$&$4$6$$$^$9!#(B
$B$*$a$G$H$&$4$6$$$^$9!#(B
Post by Masato
TreeView $B$N(B AfterSelect $B%$%Y%s%H$G!"(B
TreeView.ContextMenu $B%W%m%Q%F%#$K!"?<$5$K1~$8$F(B
$B%3%s%F%-%9%H%a%K%e!<(B (System.Windows.ContextMenu) $B$r%;%C%H$7$F$$$^$9!#(B
$B$3$l$G%"%W%j%1!<%7%g%s%-!<$G%]%C%W%"%C%W$5$l$k$h$&$K$J$j$^$7$?!#(B
$B$7$+$7!"%]%C%W%"%C%W0LCV$,(BTreeView$B%3%s%H%m!<%k$NCf1{$K$J$C$F$7$^$&$h$&$J$N$G$9!#(B
$B$=$l$G!"A*BrCf$N%N!<%I$N2#%C%A%g$K%]%C%W%"%C%W$G$-$l$P$$$$$J!"$H;W$&$N$G$9!#(B
AfterSelect$B%$%Y%s%HFb$G$O!"(Be.Node.Bounds$B$G<h$l$^$9!#(B
$B$?$@$7!"%]%$%s%H7?$K$O<+A0$GJQ49$7$^$9!#(B
--
############################################################
$B!!!!MnF#!!M&0lO:(B
############################################################
Masato
2005-01-06 19:45:16 UTC
Permalink
$B$*JV;v$"$j$,$H$&$4$6$$$^$7$?!#(B
$B$*$+$2$5$^$G!"0J2<$N%3!<%I$K$F<B8=$G$-$^$7$?!#(B

Point myPoint = new
Point(treeMain.SelectedNode.Bounds.Left,treeMain.SelectedNode.Bounds.Top);
myPoint.X += treeMain.SelectedNode.Bounds.Width;

Loading...