Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!ukma!gatech!emory!stiatl!meo From: meo@stiatl.UUCP (Miles O'Neal) Newsgroups: comp.windows.x Subject: Re: Button selection(when program starts) Message-ID: <7040@stiatl.UUCP> Date: 26 Sep 89 14:37:37 GMT Organization: Sales Technologies Inc., "The Little Shop of Horrors..." Lines: 26 In article <14630@bloom-beacon.MIT.EDU> jstravis@athena.mit.edu (John S. Travis) writes: | | How can one start a program with some buttons initially |invoked. I have a series of buttons (options A-F), and when |i run the program i want option A to be in effect at the beginning. |It's easy to set A as the option, but how do i start with the button for |option A highlighted, as if it had been selected? Using the Resource |file or selecting it soemhow in the program? Probably the easiest way ois to send it the event sequence it would receive if it were actually pressed. Use XSendEvent from the X11 intrinsics (NOTE: not the Xt intrinsics). Here is the declaration: Status XSendEvent(dpy, w, propagate, event_mask, event) register Display *dpy; Window w; Bool propagate; long event_mask; XEvent *event; { As an example, check out Xt/Selection.c . -Miles O'Neal {yr fave backbone here}!gatech!stiatl!meo