Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde!uunet!samsung!zaphod.mps.ohio-state.edu!swrinde!emory!stiatl!meo From: meo@stiatl.UUCP (Miles O'Neal) Newsgroups: comp.windows.x Subject: Re: Associating an action routine with the value field of a dialog widget Keywords: Dialog widget, action routine, Athena widgets Message-ID: <8022@stiatl.UUCP> Date: 5 Dec 89 17:14:34 GMT Organization: Sales Technologies Inc., "The Little Shop of Horrors..." Lines: 24 In article <15908@megaron.cs.arizona.edu> sandra@cs.arizona.edu (Sandy Miller) writes: |I am trying to associate an action routine with the value field (input |line) of a dialog widget, and was wondering if anyone has done this before. |I have a simple dialog widget which prompts the user to enter a filename. |There are two command buttons for the user to "confirm" or "cancel" |the filename, and these work fine. But I would also like to process |the filename if the user types a carriage return, in the same way I |process it if the confirm button is pressed. I can associate an action |routine with the dialog widget, but that doesn't work for actions inside |the "value" widget. Anyone have any ideas?? We cheat. But this will work. We created a file with routines that return the widget pointers for subwidgets of the packaged widgets we created (including an enhanced Dialog widget). So you can override translations using asomething like W = GetDialogTextPtr (dialogWidgetPtr); XtOverrideTranslations (W, (XtTranslations)XtParseTranslationTable (IT)); The GetDialogTextPtr() basically just returns the appropriate pointer, using the DialogP.h file to get the structure. -Miles O'Neal {yr fave backbone here}!emory!stiatl!meo