home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / windows / openloo / 4390 < prev    next >
Encoding:
Text File  |  1992-11-07  |  1.3 KB  |  48 lines

  1. Newsgroups: comp.windows.open-look
  2. Path: sparky!uunet!spool.mu.edu!yale.edu!jvnc.net!news.edu.tw!sparc4.ncu.edu.tw!mbox!michael
  3. From: michael@mbox.ee.ncu.edu.tw (Michael Lin)
  4. Subject: The controlarea of notice widget problem
  5. Message-ID: <1992Nov6.092226.16918@sparc4.ncu.edu.tw>
  6. Sender: news@sparc4.ncu.edu.tw
  7. Organization: Dep. of EECS, National Central University, Chungli, Taiwan, R.O.C.
  8. Date: Fri, 6 Nov 1992 09:22:26 GMT
  9. Lines: 37
  10.  
  11. Hi,
  12.     When I use the control area of notice widget to display text, it does
  13. not work. The notice widget doesn't display the text. Can it or not?
  14.     The program is as following
  15.  
  16. void callback(w, client_data, call_data)
  17. Widget         w;
  18. XtPointer     client_data, call_data;
  19. {
  20.     Widget      notice, con, text, rt, reset, ok;
  21.     Widget    begin, inter, expert;
  22.     char    message[80];
  23.  
  24.     if (notice == (Widget)NULL)
  25.     {
  26.       notice = XtVaCreatePopupShell("notice", 
  27.             noticeShellWidgetClass, w, 
  28.             NULL);
  29.  
  30.         XtVaGetValues(popup, XtNtextArea, &text,
  31.         XtNcontrolArea, &con,
  32.         NULL);
  33.  
  34.       rt = XtCreateManagedWidget("rt", rubberTileWidgetClass,
  35.                    con, NULL, 0);
  36.  
  37.       XtVaSetValues(text, XtNstring, "Fastest Mine Sweepers", NULL);
  38.  
  39.     begin = XtVaCreateManagedWidget("Beginner",
  40.             staticTextWidgetClass, rt,
  41.             XtNlabel,    "test",
  42.             NULL);
  43.     }
  44.     XtPopup(notice, XtGrabExclusive);
  45. }
  46.  
  47. Michael Lin
  48.