Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ncar!bierstat.scd.ucar.edu!morreale From: morreale@bierstadt.scd.ucar.edu (Peter Morreale) Newsgroups: comp.windows.x Subject: Binding events in one widget to another Keywords: Command, asciiText Xt widgets... Message-ID: <11935@ncar.ucar.edu> Date: 25 Jun 91 22:41:24 GMT Sender: news@ncar.ucar.edu Reply-To: morreale@bierstadt.scd.ucar.edu (Peter Morreale) Organization: Scientific Computing Division / NCAR, Boulder Co. Lines: 34 Question for Xt folks.... Suppose I have a Command button and asciitext widget in an app. I'd like to bind a RETURN in the text widget to a Button1 press in the command widget. In other words, if the user hits a RETURN in the text, the command widget acts as if it had received a button click. (enter, down and release) It would be trivial to bind an action to the text widget to execute the command button callback, but what I'm after is the highlighting in the command button. (this is what I'm doing now, I just don't have the visual effects...) Ideally, I'd like the text widget's "EnterNotify" event to get passed to the command so that the command's "highlight()" action is called, then the "Return" in the text widget does the command button's "set() notify() unset()" actions. (I'd also like the text's "LeaveNotify" event to execute the command's "unhighlight()" action.....) In short, I want to bind the visual effects of events in the command widget executed from events in the text widget. How do I do this? Thanks -PWM -- ------------------------------------------------------------------ Peter W. Morreale email: morreale@ncar.ucar.edu Nat'l Center for Atmos Research voice: (303) 497-1293 Scientific Computing Division Consulting Office ------------------------------------------------------------------