textf = XmCreateTextField[spinbox, "textf", args, n] XtManageChild[textf] //显示窗口 XtRealizeWidget[toplevel] //进入事件循环 XtAppMainLoop[app]