home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!edcastle!hwcs!hwcs!andrewd
- From: andrewd@cs.hw.ac.uk (Andrew Dowding)
- Newsgroups: comp.windows.x.motif
- Subject: Help Please (realizing a widget) !!
- Message-ID: <1992Aug20.094755.19098@cs.hw.ac.uk>
- Date: 20 Aug 92 09:47:55 GMT
- Sender: news@cs.hw.ac.uk (News Administrator)
- Organization: Dept of Computer Science, Heriot-Watt University, Scotland
- Lines: 50
-
- If anyone can help me I would be eternally grateful. I've looked at the
- following and cannot see what is wrong.
- The following procedure is a callback from a message box (the help button),
- unfortunately, although I know this procedure is called, it does not actually
- realize any of the widgets (nothing pops up anyway) !
-
- void mailCB(w, email, call_data)
- Widget w;
- char *email;
- caddr_t call_data;
- {
- Widget bb, shell;
- Widget Mailboard;
- Widget Cc Send;
- Arg args[10];
- register int n;
-
- shell=XtCreatePopupShell("popup",applicationShellWidgetClass, w, NULL, 0);
- bb=XmCreateBulletinBoard(shell, "BBoard2", NULL, 0);
-
- /* Create Form */
- n=0;
- Mailboard = XmCreateForm(bb, "Mailboard", args, n);
-
- /* Single Line Text widget */
- n = 0;
- XtSetArg(args[n], XmNcolumns, 60); n++;
- XtSetArg(args[n], XmNrows, 1); n++;
- XtSetArg(args[n], XmNwidth, 250); n++;
- XtSetArg(args[n], XmNeditMode, XmSINGLE_LINE_EDIT); n++;
- Cc = XmCreateText(Mailboard, "Cc", args, n);
- XtManageChild(Cc);
-
- /* Send Button widget */
- n = 0;
- XtSetArg (args[n], XmNlabelString,
- XmStringCreateLtoR("Send", XmSTRING_DEFAULT_CHARSET)); n++;
- XtSetArg (args[n], XmNwidth, 50); n++;
- Send = XtCreateManagedWidget ("Send", xmPushButtonWidgetClass, Mailboard, args, n);
-
- XtManageChild(Mailboard);
- XtManageChild(bb);
- XtRealizeWidget(shell);
-
- }
-
- Thanks in advance for any help
- Andy
- ----
- -- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 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. | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-