Notifications
Clear all
[Closed] Setfocus problem
Jan 01, 2022 3:06 am
i have a window that is in focus
and i have a macroscript button on the toolbar that when pressed it would do some stuff to the focused window
the problem is the whenever i press the button it steals the focus from the window
any idea around this ?
5 Replies
Jan 01, 2022 3:06 am
setfocus ?
rollout testFocus "Test Focus"
(
edittext text1 "Test"
edittext text2 "Focus"
)
createDialog testFocus 200 100
setFocus testFocus.text2 --the second text field gets focus!
Jan 01, 2022 3:06 am
unfortunately its not a dialog rather a native 3ds max’s widnow like the slate material editor for example
Jan 01, 2022 3:06 am
then try SetForegroundWindow, but slate editor that you mentioned actually has .SetFocus() function
Jan 01, 2022 3:06 am
sme.setfocus()
– Unknown property: “setFocus” in Interface:SME
– MAXScript callstack:
– thread data: threadID:13472
– [stack level: 0]
– In top-level