资 源 简 介
//建立按钮上标签的字符串
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]