01-22-2007, 06:56 PM
When I use this the window dissapears
I use this code now: in the inp2 what i should make:
;\Dialog_Editor
function# str&a [$text] [$caption] [$default] [x] [y]
;Input box. Similar to inp, but you can set position.
;Requires QM 2.1.8 or later.
;EXAMPLE
str s
if(!inp2(s "text" "caption" "" 0 -10)) end
out s
str controls = "0 3 4"
str d0 st3 e4
d0=iif(len(caption) caption "QM Input")
st3=text
e4=default
if(!ShowDialog("inp2" 0 &controls 0 0 0 0 0 x y)) ret
s=e4
ret 1
BEGIN DIALOG
0 "" 0x90C80A46 0x188 0 0 222 68 ""
3 Static 0x54000000 0x0 6 6 216 12 ""
4 Edit 0x54030080 0x200 6 24 214 14 ""
1 Button 0x54030001 0x4 118 50 48 14 "OK"
2 Button 0x54030000 0x4 170 50 48 14 "Cancel"
END DIALOG
DIALOG EDITOR: "" 0x2010900 "" ""
And in the program:
Start
if(!inp2(_s "......." "................." "" -1 1)) ret
_s.setclip()
act "....."
key keycode
key keycode
10
key keycode agan
10
goto Start
I cannot see what is wrong with this, maybe i'm stupid or so......
I use this code now: in the inp2 what i should make:
;\Dialog_Editor
function# str&a [$text] [$caption] [$default] [x] [y]
;Input box. Similar to inp, but you can set position.
;Requires QM 2.1.8 or later.
;EXAMPLE
str s
if(!inp2(s "text" "caption" "" 0 -10)) end
out s
str controls = "0 3 4"
str d0 st3 e4
d0=iif(len(caption) caption "QM Input")
st3=text
e4=default
if(!ShowDialog("inp2" 0 &controls 0 0 0 0 0 x y)) ret
s=e4
ret 1
BEGIN DIALOG
0 "" 0x90C80A46 0x188 0 0 222 68 ""
3 Static 0x54000000 0x0 6 6 216 12 ""
4 Edit 0x54030080 0x200 6 24 214 14 ""
1 Button 0x54030001 0x4 118 50 48 14 "OK"
2 Button 0x54030000 0x4 170 50 48 14 "Cancel"
END DIALOG
DIALOG EDITOR: "" 0x2010900 "" ""
And in the program:
Start
if(!inp2(_s "......." "................." "" -1 1)) ret
_s.setclip()
act "....."
key keycode
key keycode
10
key keycode agan
10
goto Start
I cannot see what is wrong with this, maybe i'm stupid or so......
