hello,
I'd like to clic a key -> open window, tape a value and clic enter (numeric)
and voilà : I have set new timeframe.
but I don't know how to validate the value with enter key, I don't want to clic on the "go" button.... please, any idea ?
------------------------------------------------------------
try destroyDialog rlMover catch()
global rlMover = rollout rlMover "GO2frame"
(
button butconnect "GO" pos:[2,2]
spinner spX "X " width:90 range:[0,5000,1] type:#integer pos:[55,5]
on spX KeyDOwn evnt do
if evnt.KeyCode == (dotNetClass "System.Windows.Forms.Keys").Enter do
(
sliderTime = spX.value
)
)
createDialog rlMover 160 25
setFocus rlMover.spX
------------------------------------------------------------
Forum topic · General Scripting
go to frame
By titane357 · 2012-09-13
Comments (4)
Comment policy
you need to use (dotNetControl "NumericUpDown") if you use keydown event.Thats way not works.
use "Return" instead of "Enter"
or you can use keyValue like this
try this script to see KeyCode or keyValues of keyboard keys
http://www.scriptspot.com/3ds-max/scripts/key-value
thanks for answer, but unfortunally it don't work for me...
instead I use change value, that's do the trick...
-----------------------------------------------------
(
try destroyDialog rlMover catch()
global rlMover = rollout rlMover " GO2frame"
(
spinner spX ">>> FRAME " width:150 range:[0,5000,1] type:#integer pos:[5,5]
on spX changed val do
(
sliderTime = spX.value
)
)
createDialog rlMover 160 25
setFocus rlMover.spX
)
---------------------------------------------------------
hey Titane!
Why you use "changed" event of the spinner
then you have "entered"?