-- Hi~ I have a Problem need You-Masters Help~~~
-- I wrote a UI and I'm going to float the "rollout InsideChild" next to Main and follow it
rollout Main "Main" width:320 height:650
(
subrollout M_sub "MainSub" width:300 height:650
-- on Main moved Mainpos do ( setDialogpos InsideChild) ((Getdialogpos MainChild)+[500,100]) )
-- on Main moved Mainpos do ( setDialogpos (Main.rollouts[1].rollouts[1]) ((Getdialogpos MainChild)+[500,100]) )
--|||<<<* 3 *>>>||| I tried to write rollout Main to the bottom of the paragraph of rollout MainChild section but I couldn't Get InsideChild
-- Because InsideChild is not registered(Add) with MainChild . And because MainChild is registered with Main, InsideChild cannot be registered with MainChild As Child of Child
-- I also tried to use Function or Global_Value Equal to or Put it into While()do() Loop to , but it was too inefficient to use
-- if I write on Main moved Mainpos do outside MsE will tell me that there is a syntax error and even Try()-in will not pass
----|||<<<* ??? *>>>||| Is there any good way I can broadcast Main.Moved() into MainChild
-- Tell the InsideChild to know and perform SetDialogpos ?????
)
--===================== 1st Part above =====================================--
rollout MainChild "MainChild"
(
Checkbutton B_CallInsideChild "CallInsideChild" whith:200 Height:100 default:on
rollout InsideChild "InsideChild"
(
local HelpCommentString = "
Something Help
string
string
string
string
string
string
string
string
string
string
string
string
string
string
"
Label HelpComment HelpCommentString width:200 height:300 align:#left align:#top
Timer CheckIC interval:150 active:false
on InsideChild Close do( B_CallInsideChild.state = off ; CheckIC.active = off )
on InsideChild Open do( CheckIC.active = on )
on CheckIC Tick do ( CheckIC.active = on ; SetDialogpos InsideChild ((Getdialogpos Main)+[350,200]) ; SetFocus Main ; print CheckIC.ticks )
--While InsideChild.open != false do ( SetDialogpos InsideChild ((Getdialogpos MainChild)+[500,100]) ; SetFocus Main ) --<<<the performance is Too Slow
--|||<<<* 2 *>>>||| I tried to do this with a Timer but it was very inefficient and without SetFocus() the focus of the dialog stayed on InsideChild
)
on B_CallInsideChild changed state do
(
if B_CallInsideChild.state == on then
(
Createdialog InsideChild whith:200 Height:300 pos:((Getdialogpos Main)+[350,200]) parent:MainChild.HWND
)
else if B_CallInsideChild.state == off then Destroydialog InsideChild
)
--on Main moved MainPos do ( setDialogpos InsideChild ((Getdialogpos Main)+[500,100]) )
--|||<<<* 1 *>>>||| This is the one up where I can't get the operation of Main.Moved() form Main into MainChild .
--so I can't tell if Main has moved and then I can do something else
--on MainChild moved MainPos do ( setDialogpos InsideChild ((Getdialogpos MainChild)+[500,100]) )
--|||<<<* 1 *>>>||| I could Got this if I just wrote 1st Part alone
--But the point is that my Root interface is Main ...Once you Add it to the Main , you can't get Pos for MainChild
--and Could Not Get Mani.moved() in MainChild/InsideChild Also....
)
--===================== 2nd Part above =====================================--
-- On execute do
(
if Main.open != true then
(
Createdialog Main pos:[1200,600]
Addsubrollout Main.M_sub MainChild
)
else Destroydialog Main
)