//建立頂級(jí)窗口
toplevel = XtVaAppInitialize[&app, "Label", NULL, 0,
&argc, argv, NULL, NULL]
//建立按鈕上標(biāo)簽的字符串
str = XmStringCreateLtoR["A Simple\n Label",
XmFONTLIST_DEFAULT_TAG]
n = 0
XtSetArg[args[n], XmNlabelString, str] n++
label = XmCreateLabel[toplevel, "pushbutton", args, n]
XtManageChild[label]
XmStringFree[str]
//顯示窗口
XtRealizeWidget[toplevel]
//進(jìn)入事件循環(huán)
XtAppMainLoop[app]
標(biāo)簽:
NULL
XtVaAppInitialize
toplevel
Label
上傳時(shí)間:
2014-01-11
上傳用戶:bruce5996