[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
    Search the FAQ Archives

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page

Top Document: comp.windows.x Frequently Asked Questions (FAQ) 7/7
Previous Document: 160) What's the difference between actions and callbacks?
Next Document: 162) Can I make Xt or Xlib calls from a signal handler?


161) How do I simulate a button press/release event for a widget?



You can do this using XSendEvent(); it's likely that you're not setting the
window field in the event, which Xt needs in order to match to the widget
which should receive the event.

If you're sending events to your own application, then you can use
XtDispatchEvent() instead. This is more efficient than XSendEvent() in that
you avoid a round-trip to the server.

Depending on how well the widget was written, you may be able to call its
action procedures in order to get the effects you want.

[courtesy Mark A. Horstman (mh2620@sarek.sbc.com), 11/90]



Top Document: comp.windows.x Frequently Asked Questions (FAQ) 7/7
Previous Document: 160) What's the difference between actions and callbacks?
Next Document: 162) Can I make Xt or Xlib calls from a signal handler?

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page


[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
faq%craft@uunet.uu.net (X FAQ maintenance address)

Last Update October 22 2009 @ 05:36 AM

Some parts © 2009 Advameg, Inc.