home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / windows / x / motif / 5713 < prev    next >
Encoding:
Text File  |  1992-08-20  |  2.1 KB  |  61 lines

  1. Path: sparky!uunet!mcsun!uknet!edcastle!hwcs!hwcs!andrewd
  2. From: andrewd@cs.hw.ac.uk (Andrew Dowding)
  3. Newsgroups: comp.windows.x.motif
  4. Subject: Help Please (realizing a widget) !!
  5. Message-ID: <1992Aug20.094755.19098@cs.hw.ac.uk>
  6. Date: 20 Aug 92 09:47:55 GMT
  7. Sender: news@cs.hw.ac.uk (News Administrator)
  8. Organization: Dept of Computer Science, Heriot-Watt University, Scotland
  9. Lines: 50
  10.  
  11. If anyone can help me I would be eternally grateful. I've looked at the
  12. following and cannot see what is wrong.
  13. The following procedure is a callback from a message box (the help button),
  14. unfortunately, although I know this procedure is called, it does not actually
  15. realize any of the widgets (nothing pops up anyway) !
  16.  
  17. void mailCB(w, email, call_data)
  18. Widget w;
  19. char *email;
  20. caddr_t call_data;
  21. {
  22.   Widget bb, shell;
  23.   Widget Mailboard;
  24.   Widget Cc Send;
  25.   Arg args[10];
  26.   register int n;
  27.  
  28.   shell=XtCreatePopupShell("popup",applicationShellWidgetClass, w, NULL, 0);
  29.   bb=XmCreateBulletinBoard(shell, "BBoard2", NULL, 0);
  30.  
  31.   /* Create Form */
  32.   n=0;
  33.   Mailboard = XmCreateForm(bb, "Mailboard", args, n);
  34.   
  35.   /* Single Line Text widget */
  36.   n = 0;
  37.   XtSetArg(args[n], XmNcolumns, 60); n++;
  38.   XtSetArg(args[n], XmNrows, 1); n++;
  39.   XtSetArg(args[n], XmNwidth, 250); n++;
  40.   XtSetArg(args[n], XmNeditMode, XmSINGLE_LINE_EDIT); n++;
  41.   Cc = XmCreateText(Mailboard, "Cc", args, n);
  42.   XtManageChild(Cc);
  43.  
  44.   /* Send Button widget */
  45.   n = 0;
  46.   XtSetArg (args[n], XmNlabelString,
  47.             XmStringCreateLtoR("Send", XmSTRING_DEFAULT_CHARSET)); n++;
  48.   XtSetArg (args[n], XmNwidth, 50); n++;
  49.   Send = XtCreateManagedWidget ("Send", xmPushButtonWidgetClass, Mailboard, args, n);
  50.  
  51.   XtManageChild(Mailboard);
  52.   XtManageChild(bb);
  53.   XtRealizeWidget(shell);
  54.  
  55. }
  56.  
  57. Thanks in advance for any help
  58. Andy
  59. ----
  60. --  +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | JANET:    andrewd@uk.ac.hw.cs        Andrew Dowding, Computer Science Dept, | | Internet: andrewd@cs.hw.ac.uk        Heriot-Watt University,                | | UUCP:     ..mcsun!ukc!hwcs!andrewd   Riccarton, Edinburgh, Scotland.        | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  61.