Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!usc!snorkelwacker!bloom-beacon!WILKINS.BCM.TMC.EDU!jcarson From: jcarson@WILKINS.BCM.TMC.EDU (Janet L. Carson) Newsgroups: comp.windows.x Subject: Athena Toggle Radio Group Question Message-ID: <9005251942.AA01894@wilkins.bcm.tmc.edu> Date: 25 May 90 19:42:09 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 57 I am having some problems with the Athena toggle widget in a radio group. I have successfully created radio groups where I have been able to specify the radio group at the time the widgets are being created. However, I have a situation where I need to be able to set up a radio group "on the fly." I'm using WsXc to generate my widget tree for me, (saves a *lot* of C coding!) and I want to set the radio group from the createCallback. A short test program to illustrate my problem is below. Why won't these toggles function as a radio group? Janet L. Carson internet: jcarson@bcm.tmc.edu Baylor College of Medicine uucp: {rutgers,mailrus}!bcm!jcarson ------------------------ cut here for app defaults file --------------- *Toggle.translations: \ : highlight(Always) \n \ : unhighlight() \n \ ,: set() notify() ------------------------ cut here for code --------------------------- #include #include #include #include #include main(argc,argv) int argc; char *argv[]; { Widget toplevel, box, toggles[3]; XtAppContext app_con; int j; toplevel = XtAppInitialize(&app_con, "Testme", NULL, 0, &argc, argv, NULL, NULL, 0); box = XtCreateWidget("box", boxWidgetClass, toplevel, NULL, 0); for (j = 0; j < 3; j++) toggles[j] = XtCreateWidget("toggle", toggleWidgetClass, box, NULL, 0); for (j = 1; j < 3; j++) XawToggleChangeRadioGroup(toggles[j], toggles[0]); XtManageChild(box); XtManageChildren(toggles, 3); XtRealizeWidget(toplevel); XtAppMainLoop(app_con); }