tom@capella.ucsb.edu (Tom Weinstein) (02/22/90)
I have a Box widget that contains a number of Command widgets, and I want to be able to change their sensitivity. Ideally, I would like to be able to do this by just changing the sensitivity of the Box widget that is their parent. This doesn't seem to work, however. If I set the sensitivity explicity when I create the Box widget, the Command widgets have the specified sensitivity. If, on the other hand, I set the sensitivity of the Box with XtVaSetValues, it doesn't seem to change the sensitivity of the children. I have managed to do what I want by doing a XtVaGetValues on the Box widget to get a list of the children, and then setting sensitivity on each one individually, but I would rather just change it on the Box widget. Am I doing something wrong, or do I misunderstand something, or is this a bug? -- It does not do to leave a dragon | Tom Weinstein ...ucbvax!hub!ucsbuxa!6600tom out of your calculations, if you | 6600tom@ucsbuxa.bitnet tom@bears.ucsb.edu live near him. --J.R.R. Tolkien | 6600tom@ucsbuxa.ucsb.edu tomw@cornu.ucsb.edu
asente@decwrl.dec.com (Paul Asente) (02/22/90)
In article <4027@hub.UUCP> tom@bears.ucsb.edu writes: >I have a Box widget that contains a number of Command widgets, and I >want to be able to change their sensitivity. Ideally, I would like to >be able to do this by just changing the sensitivity of the Box widget >that is their parent. This doesn't seem to work, however. > >If I set the sensitivity explicity when I create the Box widget, the >Command widgets have the specified sensitivity. If, on the other hand, >I set the sensitivity of the Box with XtVaSetValues, it doesn't seem to >change the sensitivity of the children. > >Am I doing something wrong, or do I misunderstand something, or is this >a bug? You're doing something wrong. There are two ways to change sensitivity: - When you create the widget by using the XtNsensitive resource. - Later on, by using XtSetSensitive. XtSetSensitive has the logic in it for setting the children of the specified widget insensitive. -paul asente asente@decwrl.dec.com decwrl!asente