Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!socrates!ems From: ems@socrates.JPL.NASA.gov (Eric Slimko) Newsgroups: comp.windows.x.motif Subject: Text in popup dialog (again) Message-ID: <1990Sep6.185706.26352@elroy.jpl.nasa.gov> Date: 6 Sep 90 18:57:06 GMT Sender: news@elroy.jpl.nasa.gov (Usenet) Reply-To: ems@socrates.jpl.nasa.gov Organization: Jet Propulsion Laboratory, NASA/Caltech Lines: 74 Nntp-Posting-Host: socrates.jpl.nasa.gov Recently, I posted a question concerning the activate callback of a Text widget in a Popup Dialog. I tried the suggestions that were...suggested, and had no luck. The problem is that I can't get the activate callback to work. So, here is the test program I am working with. If any X/Motif guru could take a look at this, I would be most appreciative... -----Cut Here-------------- #include #include #include #include #include Widget popup; void doit(w, client_data, call_data) Widget w; int client_data; caddr_t call_data; { printf("\nHi!"); if (client_data==1) XtManageChild(popup); } void main(argc, argv) unsigned int argc; char **argv; { Widget toplevel; Widget form, btn, text; static String trans = { "Return: Activate()" }; /*I tried all kinds of translations here*/ Arg args[2]; toplevel=XtInitialize (argv[0], "Xtest", NULL, 0, &argc, argv); form=XmCreateBulletinBoard(toplevel, "form", NULL, 0); XtManageChild(form); btn=XmCreatePushButton(form, "btn", NULL, 0); XtManageChild(btn); /* I've tried it also with this argument, to no avail XtSetArg(args[0], XmNtextTranslations, XtParseTranslationTable(trans));*/ popup=XmCreateBulletinBoardDialog(form, "popup", NULL, 0); text=XmCreateText(popup, "text", NULL, 0); XtOverrideTranslations(text, XtParseTranslationTable(trans)); /*This doesn't help either*/ XtManageChild(text); XtAddCallback(text, XmNactivateCallback, doit, 0); XtAddCallback(btn, XmNactivateCallback, doit, 1); XtRealizeWidget(toplevel); XtMainLoop(); } Oh, I tried putting the text widget in another composite widget (a row/column), but no luck. Thanks in advance, -- Eric Slimko | Jet Propulsion Laboratories ems@socrates.jpl.nasa.gov | NASA/CalTech