Проблема с таблицей, точнее компонентом управления внешним контролом внешним. Как считать координаты внешнего контрола? Вычитать отступ от края до начальной координаты расположения? В слоях отсутствуют точки фактической ширины/высоты/отступов для вычисления отступа соседней таблицы MST (в данном случае). В справке ни слова про это.
Add(MainForm,7341672,112,189)
{
Width=1403
Height=675
link(onCreate,16088235:doResize,[(166,209)(166,272)])
}
Add(PageControl,4067262,878,357)
{
Left=250
Top=250
Width=800
Height=800
Layout="1"
WidthScale=100
HeightScale=100
Selected="base"
AutoCreate=1
SelectAdd=0
Point(Left)
Point(Top)
link(onEventData,11457551:doSetOnChange,[])
link(onClick,11295864:doTimer,[(919,370)(919,430)(765,430)(765,482)])
link(Data,7473735:Value,[(884,338)(881,338)])
}
BEGIN_SDK
Add(EditPolyMulti,14820162,21,21)
{
WorkCount=#5:##add|8:##delete|
EventCount=#11:onEventData|7:onClick|
VarCount=#7:##count|7:##index|4:Left|3:Top|
DataCount=#4:Data|
Width=755
Height=529
Point(##add)
Point(##delete)
Point(##count)
Point(##index)
link(##add,9099381:doData,[(98,27)(98,76)])
}
Add(PagePanel,13516436,273,49)
{
Left=255
Top=5
Width=1205
Height=623
Point(doCaption)
Point(PHandle)
Point(Left)
Point(Top)
}
Add(DoData,9099381,175,70)
{
link(onEventData,11479888:doEvent1,[])
link(Data,14820162:Data,[(181,46)(27,46)])
}
Add(Hub,11479888,231,70)
{
OutCount=4
link(onEvent1,13516436:doCaption,[(259,76)(259,55)])
link(onEvent2,11144517:doData,[(263,83)(263,104)])
link(onEvent3,10041622:doEnum,[(419,90)(419,412)])
link(onEvent4,11323944:doResize,[(259,97)(259,146)])
}
Add(DoData,11144517,273,98)
{
link(onEventData,14820162:onEventData,[(491,104)(491,27)])
link(Data,13516436:PHandle,[])
}
Add(BitBtn,11571840,406,28)
{
Left=25
Top=120
Width=200
Height=95
Layout="left"
Caption="Del_this"
link(onClick,14820162:onClick,[])
}
Add(MST_UseEditCtrl,3498945,56,385)
{
@Color=43775
MSTControl="usrs_lst"
PColor(onCellSize,8421440)
PColor(onEscCell,32768)
link(onCellSize,15975994:doEvent1,[])
link(onEnterCell,16046716:doEvent1,[(119,398)(119,412)])
link(onEscCell,10333899:doWork1,[(109,412)(109,447)])
}
Add(MT_MultiData,4674596,252,385)
{
@Hint=#25:Положение и ширина ячейки|
Count=4
link(onData1,6564384:doLeft,[])
link(onData2,6564384:doTop,[])
link(onData3,6564384:doWidth,[])
link(onData4,6564384:doHeight,[])
}
Add(Hub,16046716,133,406)
{
OutCount=5
link(onEvent1,291971:doData,[(164,412)(164,384)])
link(onEvent3,6564384:doBringToFront,[])
link(onEvent4,6564384:doSetFocus,[(252,433)(252,419)])
link(onEvent5,10333899:doWork2,[(179,440)(179,454)])
}
Add(DoData,291971,182,378)
{
link(onEventData,1427951:doConvert,[])
link(Data,3498945:Cell,[(188,366)(136,366)(136,429)(83,429)])
}
Add(DateConvertor,1427951,294,378)
{
Mode=8
Format="yyyy.MM.dd"
Point(Data)
link(onResult,6564384:doSetDate,[])
}
Add(DateConvertor,16664805,434,378)
{
Mode=9
Format="yyyy.MM.dd"
Point(Data)
link(onResult,3498945:doSetData,[(482,384)(482,350)(44,350)(44,391)])
}
Add(ChanelToIndex,10333899,210,441)
{
link(onIndex,6564384:doVisible,[(372,447)(372,433)])
}
Add(MT_String,8919219,371,497)
{
link(onResult,5994652:doText,[])
}
Add(Label,5994652,448,497)
{
Left=30
Top=10
Width=200
ParentFont=0
Layout="left"
AutoSize=1
}
Add(DatePicker,6564384,378,378)
{
Left=45
Top=340
Width=135
Height=21
Font=[Arial,10,0,0,204]
Antialiased=4
Visible=1
Style=1
DateFormat=1
Format="yyyy.MM.dd"
TitleBkColor=12639424
TitleTextColor=-16777192
MonthBkColor=-16777192
Point(doLeft)
Point(doTop)
Point(doWidth)
Point(doHeight)
Point(DateTime)
Point(doSetFocus)
Point(doBringToFront)
Point(doVisible)
link(onChange,16664805:doConvert,[])
}
Add(Hub,15975994,224,385)
{
link(onEvent1,4674596:doSeparateMT,[])
link(onEvent2,8919219:doStr,[(247,398)(247,503)])
}
Add(MTStrTbl,1840207,98,266)
{
Left=240
Top=5
Width=420
Height=270
akLeft=1
akTop=1
MinHeight=30
Color=-16777192
Antialiased=4
ParentFont=0
Name="usrs_lst"
HintTitle="Подсказка"
HintIcon=1
HintManager=""
Layout="2"
ColorSp=12639424
Columns=#9:Ф.И.О=250|6:От=100|6:До=100|
Point(onMouseDown)
Point(Width)
}
Add(Button,3236190,462,182)
{
Left=25
Top=35
Width=200
Layout="left"
Caption="New_child->"
link(onClick,11472170:doData,[])
}
Add(MST_RowAction,12985991,728,392)
{
MSTControl="usrs_lst"
}
Add(StrList,15034837,609,350)
{
Strings=#14:sdfsdf;aaaaa;0|14:fzsdfzs;bbbb;3|13:sdfszz;cccc;2|14:sdfszz;ddddd;0|14:sdfszz;eeeee;1|14:sdfszz;fffff;3|14:fzsdfzs;gggg;2|13:sdfszz;hhhh;0|15:fzsdfzs;iiiii;3|15:sdfszz;jjjjjj;1|
}
Add(MT_String,922736,679,392)
{
link(onResult,12985991:doRowAction,[])
}
Add(ArrayEnum,10041622,623,406)
{
link(onItem,922736:doMTString,[])
link(Array,15034837:Array,[])
}
Add(PageControl,1796837,560,182)
{
Left=250
Top=250
Width=800
Height=800
Layout="2"
WidthScale=100
HeightScale=100
Selected="base"
AutoCreate=1
SelectAdd=0
Point(Left)
Point(Top)
link(onEventData,15057991:doSetOnChange,[])
link(onClick,8596483:doTimer,[(607,195)(607,219)(457,219)(457,244)])
}
BEGIN_SDK
Add(EditPolyMulti,2669103,21,21)
{
WorkCount=#5:##add|8:##delete|
EventCount=#11:onEventData|7:onClick|
VarCount=#7:##count|7:##index|4:Left|3:Top|
DataCount=#4:Data|
Width=755
Height=529
Point(##add)
Point(##delete)
Point(##count)
Point(##index)
link(##add,4192532:doData,[(98,27)(98,76)])
}
Add(PagePanel,5799095,273,49)
{
Left=675
Top=5
Width=610
Height=600
Point(doCaption)
Point(PHandle)
Point(Left)
Point(Top)
}
Add(DoData,4192532,175,70)
{
link(onEventData,14263660:doEvent1,[])
link(Data,2669103:Data,[(181,46)(27,46)])
}
Add(Hub,14263660,231,70)
{
OutCount=4
link(onEvent1,5799095:doCaption,[(259,76)(259,55)])
link(onEvent2,10177461:doData,[(263,83)(263,104)])
link(onEvent3,13207358:doEnum,[(419,90)(419,412)])
link(onEvent4,9428616:doResize,[(259,97)(259,153)])
}
Add(DoData,10177461,273,98)
{
link(onEventData,2669103:onEventData,[(491,104)(491,27)])
link(Data,5799095:PHandle,[])
}
Add(BitBtn,3556873,658,28)
{
Left=-15
Top=45
Width=200
Height=95
Layout="left"
Caption="Del"
link(onClick,2669103:onClick,[])
}
Add(MST_UseEditCtrl,14180385,56,385)
{
@Color=43775
MSTControl="usrs_lst"
PColor(onCellSize,8421440)
PColor(onEscCell,32768)
link(onCellSize,4489480:doEvent1,[])
link(onEnterCell,11346396:doEvent1,[(119,398)(119,412)])
link(onEscCell,7742669:doWork1,[(109,412)(109,447)])
}
Add(MT_MultiData,12501725,252,385)
{
@Hint=#25:Положение и ширина ячейки|
Count=4
link(onData1,9737819:doLeft,[])
link(onData2,9737819:doTop,[])
link(onData3,9737819:doWidth,[])
link(onData4,9737819:doHeight,[])
}
Add(Hub,11346396,133,406)
{
OutCount=5
link(onEvent1,9208696:doData,[(164,412)(164,384)])
link(onEvent3,9737819:doBringToFront,[])
link(onEvent4,9737819:doSetFocus,[(252,433)(252,419)])
link(onEvent5,7742669:doWork2,[(179,440)(179,454)])
}
Add(DoData,9208696,182,378)
{
link(onEventData,9149628:doConvert,[])
link(Data,14180385:Cell,[(188,366)(136,366)(136,429)(83,429)])
}
Add(DateConvertor,9149628,294,378)
{
Mode=8
Format="yyyy.MM.dd"
Point(Data)
link(onResult,9737819:doSetDate,[])
}
Add(DateConvertor,11591953,434,378)
{
Mode=9
Format="yyyy.MM.dd"
Point(Data)
link(onResult,14180385:doSetData,[(482,384)(482,350)(44,350)(44,391)])
}
Add(ChanelToIndex,7742669,210,441)
{
link(onIndex,9737819:doVisible,[(310,447)(310,433)])
}
Add(MT_String,15298015,371,497)
{
link(onResult,5389103:doText,[])
}
Add(Label,5389103,448,497)
{
Left=5
Top=15
Width=200
ParentFont=0
Layout="left"
}
Add(DatePicker,9737819,378,378)
{
Left=25
Top=430
Width=135
Height=21
Font=[Arial,10,0,0,204]
Antialiased=4
Visible=1
Style=1
DateFormat=1
Format="yyyy.MM.dd"
TitleBkColor=12639424
TitleTextColor=-16777192
MonthBkColor=-16777192
Point(doLeft)
Point(doTop)
Point(doWidth)
Point(doHeight)
Point(DateTime)
Point(doSetFocus)
Point(doBringToFront)
Point(doVisible)
link(onChange,11591953:doConvert,[])
}
Add(Hub,4489480,224,385)
{
link(onEvent1,12501725:doSeparateMT,[])
link(onEvent2,15298015:doStr,[(247,398)(247,503)])
}
Add(MTStrTbl,3085826,582,280)
{
Left=215
Top=15
Width=355
Height=415
akLeft=1
akTop=1
MinHeight=30
Color=-16777192
Antialiased=4
ParentFont=0
Name="usrs_lst"
HintTitle="Подсказка"
HintIcon=1
HintManager=""
Layout="1"
ColorSp=12639424
Columns=#9:Ф.И.О=250|6:От=100|6:До=100|
Point(onMouseDown)
Point(Width)
}
Add(MST_RowAction,11663634,728,392)
{
MSTControl="usrs_lst"
}
Add(StrList,14703185,609,350)
{
Strings=#14:sdfsdf;aaaaa;0|14:fzsdfzs;bbbb;3|13:sdfszz;cccc;2|14:sdfszz;ddddd;0|14:sdfszz;eeeee;1|14:sdfszz;fffff;3|14:fzsdfzs;gggg;2|13:sdfszz;hhhh;0|15:fzsdfzs;iiiii;3|15:sdfszz;jjjjjj;1|
}
Add(MT_String,8920285,679,392)
{
link(onResult,11663634:doRowAction,[])
}
Add(ArrayEnum,13207358,623,406)
{
link(onItem,8920285:doMTString,[])
link(Array,14703185:Array,[])
}
Add(HBoxLayout,9428616,273,147)
{
Name="1"
}
Add(VBoxLayout,1020811,273,203)
{
Name="left"
Layout="1"
}
END_SDK
Add(DoData,11472170,504,182)
{
Data=String(base)
link(onEventData,1796837:##add,[])
}
Add(HBoxLayout,11323944,273,140)
{
Name="2"
}
Add(Timer,8596483,469,238)
{
Interval=0
Enable=1
link(onTimer,14124304:doEvent1,[])
}
Add(Hub,14124304,518,238)
{
link(onEvent1,8596483:doStop,[(548,244)(548,294)(457,294)(457,251)])
link(onEvent2,8724968:doWork2,[])
}
Add(DoData,14155477,567,245)
{
link(onEventData,1796837:##delete,[(607,251)(607,228)(548,228)(548,195)])
link(Data,1796837:##index,[])
}
Add(InlineCode,15057991,630,182)
{
WorkPoints=#13:doSetOnChange|
EventPoints=#8:onChange|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|32:uses Windows, Kol, Share, Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|23: Control: PControl;|35: procedure _OnChange(Obj:PObj);|0:|9: public|23: onChange: THI_Event;|56: procedure doSetOnChange(var _Data:TData; Index:word);|7: end;|3: |14:implementation|0:|36:procedure THiAsmClass.doSetOnChange;|16:var i: integer; |5:begin|50: Control := PControl(ToInteger(_Data)).Parent;|32: if Control = nil then exit;|41: Control.OnSelChange := _OnChange; |4:end;|0:|32:procedure THiAsmClass._OnChange;|5:begin|43: _hi_OnEvent(onChange, Control.CurIndex);|4:end;|0:|4:end.|
}
Add(Button,5029591,462,308)
{
Left=25
Top=60
Width=200
Height=55
Layout="left"
Caption="Dell_child"
link(onClick,8724968:doWork3,[(557,314)])
}
Add(HubEx,8724968,553,245)
{
link(onEvent,14155477:doData,[])
}
Add(GridLayout,13403536,273,182)
{
Name="left"
Space=10
Layout="2"
Rows=3
Cols=1
AddMode=1
}
END_SDK
Add(Button,14856101,672,287)
{
Left=55
Top=255
Width=145
Height=50
Layout="left"
Caption="Add"
link(onClick,3945858:doNext,[])
}
Add(Button,3697156,784,588)
{
Left=95
Top=345
Width=105
Height=55
Layout="left"
Caption="Dell"
link(onClick,15360056:doWork3,[(872,594)])
}
Add(InlineCode,11457551,931,357)
{
WorkPoints=#13:doSetOnChange|
EventPoints=#8:onChange|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|32:uses Windows, Kol, Share, Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|10: private|23: Control: PControl;|35: procedure _OnChange(Obj:PObj);|0:|9: public|23: onChange: THI_Event;|56: procedure doSetOnChange(var _Data:TData; Index:word);|7: end;|3: |14:implementation|0:|36:procedure THiAsmClass.doSetOnChange;|16:var i: integer; |5:begin|50: Control := PControl(ToInteger(_Data)).Parent;|32: if Control = nil then exit;|41: Control.OnSelChange := _OnChange; |4:end;|0:|32:procedure THiAsmClass._OnChange;|5:begin|43: _hi_OnEvent(onChange, Control.CurIndex);|4:end;|0:|4:end.|
}
Add(Memory,7473735,875,287)
{
@Hint=#15:Состояние хоста|
Default=Integer(3)
link(onData,6105568:doData,[(919,293)(919,328)(793,328)(793,363)])
}
Add(CounterEx,3945858,742,287)
{
link(onNext,9667884:doStrCat,[])
}
Add(StrCat,9667884,805,287)
{
Str1="Page "
link(onStrCat,7473735:doValue,[])
link(Str2,3945858:Count,[(818,212)(790,212)(790,331)(748,331)])
}
Add(DoData,6105568,805,357)
{
Data=String(base)
link(onEventData,4067262:##add,[])
}
Add(Timer,11295864,770,476)
{
Interval=0
Enable=1
link(onTimer,8451700:doEvent1,[])
}
Add(Hub,8451700,819,476)
{
link(onEvent1,11295864:doStop,[(849,482)(849,532)(758,532)(758,489)])
link(onEvent2,15360056:doWork2,[(847,489)(847,482)])
}
Add(DoData,6001803,882,476)
{
link(onEventData,4067262:##delete,[(926,482)(926,426)(863,426)(863,370)])
link(Data,4067262:##index,[(888,432)(891,432)])
}
Add(HubEx,15360056,868,476)
{
link(onEvent,6001803:doData,[])
}
Add(HBoxLayout,16088235,175,266)
{
Name="1"
}
Add(VBoxLayout,8295331,175,336)
{
Name="left"
Layout="1"
}