Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!netnews.upenn.edu!msuinfo!kira.egr.msu.edu!leekin From: leekin@kira.msu.edu (Edwin Lee) Newsgroups: comp.windows.x.motif Subject: Updating MessageDialog when something happen in other widgets Message-ID: <1991Apr29.161723.15414@msuinfo.cl.msu.edu> Date: 29 Apr 91 16:17:23 GMT Sender: news@msuinfo.cl.msu.edu Organization: Michigan State University, College of Engineering Lines: 36 Originator: leekin@kira.egr.msu.edu I am using MessageDialog to display help messages, I like to make the content sensitive to the buttons selected in other widgets within the same application. What is the best way of doing it? 1. Use Global pointer point to the message to be displayed, then when certain button is pressed, the pointer is updated, and the ExposeCallback in MessageDialog would reset the MessageString and redisplay the new message. < Not sure if reseting XmNmessageString would do it> 2. Use XtCallCallbacks in the activate callback of pushbuttons, to pass the message and execute the expose callback in MessageDialog, which produce a new message using the data passed. < Not sure I can pass the message pointer in call_data, and I suppose the MessageDialog should be made known to the pushbuttons somehow> On top of this, if I extend the message display to dialog box in general (e.g. one with Text, PushButton, List Wigets) and I like the same dialog box to be sensitive to the state of applications, how is this done in a nice and clean fashion? May be too many questions in one shot, but there is a common point among this questions - how one widget inform the others about its state and the others can respond to this "message". Thanks in advance, ================================================================================ Imagine that Cray computer decides to make a personal computer. It has O O a 150 MHz processor, 200 megabytes of RAM, 1500 megabytes of disk o storage, a screen resolution of 1024 x 1024 pixels, relies entirely on ___ voice recognition for input, fits in your shirt pocket and costs $300. U What's the first question that the computer community asks? "Is it PC compatible?" - a clip from fortune leekin@egr.msu.edu | uunet!frith!leekin | leekin@msuegr.bitnet ================================================================================