Tad писал(а):
Набираем 123.99, потом исправляем 1 на 9 и получаем в Edit 923.9Как вариант -- надо запретить перемещение курсора. Да это простенький пример на скорую руку. А ты, если такой умный, возьми и приведи свою схему, а мы посмотрим
------------ Дoбавленo в 17.16:
Можно вот так сделать, не в одном Edit. Опять-таки -- это просто пример
Add(MainForm,12711339,140,140)
{
}
Add(ChildPanel,660501,203,140)
{
}
BEGIN_SDK
Add(EditMulti,6383351,21,21)
{
Width=545
Height=501
}
Add(Panel,8247545,35,105)
{
Left=15
Top=10
Width=185
Height=20
BevelInner=0
}
Add(Edit,15438086,105,105)
{
Width=35
Color=16777215
Font=[Verdana,10,1,0,204]
WinStyle=1
Text=""
Alignment=1
ClearAfterEnter=1
link(onChange,15798036:doCompare,[])
}
Add(Edit,3161263,105,210)
{
Left=50
Width=35
Color=16777215
Font=[Verdana,10,1,0,204]
WinStyle=1
Text=""
Alignment=1
ClearAfterEnter=1
link(onChange,5900746:doCompare,[])
}
Add(Edit,14650819,105,315)
{
Left=100
Width=35
Color=16777215
Font=[Verdana,10,1,0,204]
WinStyle=1
Text=""
Alignment=1
ClearAfterEnter=1
link(onChange,9156022:doCompare,[])
}
Add(Edit,6358266,105,420)
{
Left=150
Width=35
Color=16777215
Font=[Verdana,10,1,0,204]
WinStyle=1
Text=""
Alignment=1
ClearAfterEnter=1
link(onChange,12458889:doCompare,[])
}
Add(Label,6427186,147,28)
{
Left=40
Top=2
Width=9
Height=20
Font=[Verdana,10,1,0,204]
Caption="."
}
Add(Label,6193661,154,35)
{
Left=90
Top=2
Width=9
Height=20
Font=[Verdana,10,1,0,204]
Caption="."
}
Add(Label,5334392,161,42)
{
Left=140
Top=2
Width=9
Height=20
Font=[Verdana,10,1,0,204]
Caption="."
}
Add(If_else,5991795,392,112)
{
Type=3
Op2=Integer(255)
link(onFalse,5020617:doWork1,[(438,125)])
}
Add(Convertor,4970047,343,112)
{
Mode=1
link(onResult,5991795:doCompare,[])
}
Add(Delete,4896428,455,154)
{
Count=1
Direction=1
link(onDelete,15438086:doText,[(494,160)(494,97)(95,97)(95,111)])
link(Str,15438086:Text,[(461,145)(111,145)])
}
Add(StrMask,15798036,161,105)
{
Mask="###"
link(onFalse,10987628:doCompare,[])
link(onTrue,12414991:doWork2,[(200,118)(200,104)])
}
Add(StrMask,10987628,217,105)
{
Mask="##"
link(onFalse,5395400:doCompare,[])
link(onTrue,12414991:doWork3,[(256,118)])
}
Add(StrMask,5395400,273,105)
{
Mask="#"
link(onFalse,5020617:doWork2,[(312,111)(312,160)])
link(onTrue,6258641:doWork2,[])
}
Add(HubEx,5020617,434,154)
{
link(onEvent,4896428:doDelete,[])
}
Add(HubEx,6258641,322,112)
{
link(onEvent,4970047:doConvert,[])
}
Add(HubEx,12414991,252,98)
{
link(onEvent,6258641:doWork1,[(326,104)])
}
Add(If_else,2809257,392,217)
{
Type=3
Op2=Integer(255)
link(onFalse,8032995:doWork1,[(438,230)])
}
Add(Convertor,8929182,343,217)
{
Mode=1
link(onResult,2809257:doCompare,[])
}
Add(Delete,1060653,455,259)
{
Count=1
Direction=1
link(onDelete,3161263:doText,[(494,265)(494,202)(95,202)(95,216)])
link(Str,3161263:Text,[(461,250)(111,250)])
}
Add(StrMask,5900746,161,210)
{
Mask="###"
link(onFalse,11763454:doCompare,[])
link(onTrue,2627364:doWork2,[(200,223)(200,209)])
}
Add(StrMask,11763454,217,210)
{
Mask="##"
link(onFalse,15616441:doCompare,[])
link(onTrue,2627364:doWork3,[(256,223)])
}
Add(StrMask,15616441,273,210)
{
Mask="#"
link(onFalse,8032995:doWork2,[(312,216)(312,265)])
link(onTrue,6795848:doWork2,[])
}
Add(HubEx,8032995,434,259)
{
link(onEvent,1060653:doDelete,[])
}
Add(HubEx,6795848,322,217)
{
link(onEvent,8929182:doConvert,[])
}
Add(HubEx,2627364,252,203)
{
link(onEvent,6795848:doWork1,[(326,209)])
}
Add(If_else,11896549,392,322)
{
Type=3
Op2=Integer(255)
link(onFalse,5979773:doWork1,[(438,335)])
}
Add(Convertor,11131631,343,322)
{
Mode=1
link(onResult,11896549:doCompare,[])
}
Add(Delete,12339573,455,364)
{
Count=1
Direction=1
link(onDelete,14650819:doText,[(494,370)(494,307)(95,307)(95,321)])
link(Str,14650819:Text,[(461,355)(111,355)])
}
Add(StrMask,9156022,161,315)
{
Mask="###"
link(onFalse,14267694:doCompare,[])
link(onTrue,7049185:doWork2,[(200,328)(200,314)])
}
Add(StrMask,14267694,217,315)
{
Mask="##"
link(onFalse,15134093:doCompare,[])
link(onTrue,7049185:doWork3,[(256,328)])
}
Add(StrMask,15134093,273,315)
{
Mask="#"
link(onFalse,5979773:doWork2,[(312,321)(312,370)])
link(onTrue,10630800:doWork2,[])
}
Add(HubEx,5979773,434,364)
{
link(onEvent,12339573:doDelete,[])
}
Add(HubEx,10630800,322,322)
{
link(onEvent,11131631:doConvert,[])
}
Add(HubEx,7049185,252,308)
{
link(onEvent,10630800:doWork1,[(326,314)])
}
Add(If_else,7906106,392,427)
{
Type=3
Op2=Integer(255)
link(onFalse,10925005:doWork1,[(438,440)])
}
Add(Convertor,2538445,343,427)
{
Mode=1
link(onResult,7906106:doCompare,[])
}
Add(Delete,1449422,455,469)
{
Count=1
Direction=1
link(onDelete,6358266:doText,[(494,475)(494,412)(95,412)(95,426)])
link(Str,6358266:Text,[(461,460)(111,460)])
}
Add(StrMask,12458889,161,420)
{
Mask="###"
link(onFalse,11944625:doCompare,[])
link(onTrue,15219950:doWork2,[(200,433)(200,440)])
}
Add(StrMask,11944625,217,420)
{
Mask="##"
link(onFalse,2888464:doCompare,[])
link(onTrue,15219950:doWork3,[(256,433)])
}
Add(StrMask,2888464,273,420)
{
Mask="#"
link(onFalse,10925005:doWork2,[(312,426)(312,475)])
link(onTrue,12399090:doWork2,[])
}
Add(HubEx,10925005,434,469)
{
link(onEvent,1449422:doDelete,[])
}
Add(HubEx,12399090,322,427)
{
link(onEvent,2538445:doConvert,[])
}
Add(HubEx,15219950,252,434)
{
link(onEvent,12399090:doWork1,[(326,440)])
}
END_SDK