//建立頂級窗口
toplevel = XtVaAppInitialize[&app, "label", NULL, 0,
&argc, argv, NULL, NULL]
//建立按鈕上標簽的字符串
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]
//進入事件循環
XtAppMainLoop[app]
標簽:
NULL
XtVaAppInitialize
toplevel
label
上傳時間:
2014-01-11
上傳用戶:bruce5996