[comp.windows.x.motif] How do you set up a radio box?

jtc@motcad.portal.com (J.T. Conklin) (08/03/90)

I am trying to prototype a user interface using motif/uil and am 
having trouble building a radio box.  The example on page III.6-27
of the Motif Programmer's Guide seems to indicate that the following
code will work:

	.
	.
	.
	type_box: XmRadioBox {
		controls {
			XmToggleButton        type_drawing;
			XmToggleButton        type_half_photograph;
			XmToggleButton        type_gray_photograph;
		};
	};

	type_drawing: XmToggleButton {
		arguments {
			XmNlabelString = 'Drawing';
		};
	};
	.
	.
	.

Which it does, but it also prints the following warning message:
	X Toolkit Warning:
	    Name: type_box
	    Class: XmRowColumn
	    Attempt to add wrong type child to a homogeneous RowColumn Widget


Is my code and the example in the book wrong, or is my Motif Implementation
broken?

Thanks,

	--jtc

-- 
J.T. Conklin	CADnet Inc, San Ramon California
		jtc@motcad.portal.com, ...!portal!motcad!jtc

david@jpl-devvax.JPL.NASA.GOV (David E. Smyth) (08/07/90)

jtc@motcad.portal.com (J.T. Conklin) writes:
}I am trying to prototype a user interface using motif/uil and am 
}having trouble building a radio box.  ...
}	type_box: XmRadioBox {
}		controls {
}			XmToggleButton        type_drawing;
}			XmToggleButton        type_half_photograph;
}			XmToggleButton        type_gray_photograph;
}		};
}	};
}
}Which it does, but it also prints the following warning message:
}	X Toolkit Warning:
}	    Name: type_box
}	    Class: XmRowColumn
}	    Attempt to add wrong type child to a homogeneous RowColumn Widget

You can only use XmToggleButtonGadgets as children of XmRowColumn
widgets constructed via XmCreateRadioBox, which is what (I assume)
UIL is invoking here.

-------------------------------------------------------------------------
David Smyth				david@jpl-devvax.jpl.nasa.gov
Senior Software Engineer,		seismo!cit-vax!jpl-devvax!david
X and Object Guru.			(818)393-0983
Jet Propulsion Lab, M/S 230-103, 4800 Oak Grove Drive, Pasadena, CA 91109
--------------------------- Quote of the Day: ---------------------------
   "A Guru is not one who simply knows all the answers.  Rather, a
    Guru is like one who walks among the mountains, and by wandering
    around abit, can see the horizon through long narrow canyons."
-------------------------------------------------------------------------