Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!snorkelwacker.mit.edu!bloom-beacon!EXPO.LCS.MIT.EDU!converse From: converse@EXPO.LCS.MIT.EDU Newsgroups: comp.windows.x Subject: Re: Changing the name of an already created widget Message-ID: <9012171555.AA17406@excess.lcs.mit.edu> Date: 17 Dec 90 15:55:24 GMT References: Sender: daemon@athena.mit.edu (Mr Background) Organization: X Consortium, MIT Laboratory for Computer Science Lines: 27 Someone asks: Is there a way that I can change the resource settings for a widget to reflect a name change? and I reply: There is no way to change the name of an existing widget. And John Melby responds: Sure there is... w->core.name = s; w->core.xrm_name = XrmStringToQuark(s); This is not portable. It will leave the widget in an inconsistent state. The Xt specification defines the type Widget to be opaque to the application programmer. This is clearly presented in Chapter 1. The implementation header files are arranged so that the compiler will enforce the abstraction. The Xt library does not provide a method to change the name of a widget. Of course, this will not be sufficient if you're looking for a way to modify the defaults. An application programmer can change a widget's resources with XtSetValues.