//建立按钮上标签的字符串
label = XmStringCreateSimple["Hello World!"]
n = 0
XtSetArg[args[n], XmNlabelString, label] n++
button = XmCreatePushButton[Toplevel, "pushbutton", args, n]
XtManageChild[button]
XmStringFree[label]
//设置回调函数
XtAddCallback[button,
XmNactivateCallback, callback,
NULL]
标签:
XmStringCreateSimple
XtSetArg
XmNlab
label
上传时间:
2017-03-21
上传用户:fredguo