Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!rex!ames!uhccux!munnari.oz.au!mel.dit.csiro.au!yarra!melba.bby.oz.au!gnb From: gnb@bby.oz.au (Gregory N. Bond) Newsgroups: comp.windows.x Subject: Querying the resource database for a child's "requested" resources? Message-ID: Date: 11 Apr 91 07:40:58 GMT Sender: usenet@melba.bby.oz.au (news READER id) Organization: Burdett, Buckeridge and Young Ltd. Lines: 32 Nntp-Posting-Host: leo-gw Consider a subclass of a constraint widget that has three children that are created in the parent widget initialize routine. The three children are all the same class, but for one of them I want a different default value for a constraint resource. (i.e. I want children 1 and 2 to have "dislpayed: true" and child three to have "displayed: false" as the default, where displayed is a constraint resource). I also want the resource database to be able to override the default, as you would expect. The default value for the displayed resource is true, so I don't need anr args to the create call and children 1 and 2 work as expected - they are normally displayed but the user can turn them off. How can I specify the different default constraint resource for the third child? If I specify it as an arg to the XtCreateManagedWidget() call, it overrides the resource database and the user cannot change the setting. What I think I need is a way of asking the resource database what the user wants for the displayed resource of the as-yet non-existant child before calling XtCreateManagedWidget(), and set the resource to false with an arglist if either the user hasn't specified or false is what they want. Is that clear? Greg. -- Gregory Bond, Burdett Buckeridge & Young Ltd, Melbourne, Australia Internet: gnb@melba.bby.oz.au non-MX: gnb%melba.bby.oz@uunet.uu.net Uucp: {uunet,pyramid,ubc-cs,ukc,mcvax,prlb2,nttlab...}!munnari!melba.bby.oz!gnb