home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!jvnc.net!gmd.de!borneo.gmd.de!richard
- From: richard@borneo.gmd.de (Richard Czech)
- Subject: bind: How to select using Button-3
- Message-ID: <1992Aug18.123400.3968@gmd.de>
- Sender: news@gmd.de (USENET News)
- Nntp-Posting-Host: hawaii
- Reply-To: richard@borneo.gmd.de
- Organization: GMD, German National Research Center for Computer Science
- Date: Tue, 18 Aug 1992 12:34:00 GMT
- Lines: 35
-
-
- Hi!
-
- I have a Tcl/Tk application in which I want to have different bindings
- for Button-1 and Button-3 in several listboxes as follows:
-
- ButtonPress-1: select the element in the listbox
- ButtonRelease-1: perform action 1
-
- ButtonPress-3: select the element in the listbox
- ButtonRelease-3: perform action 2
-
- It works fine for Button-1, because the selection of elements in
- listboxes is predefined for Button-1. The manual page for listbox
- says:
-
- DEFAULT BINDINGS
- Tk automatically creates class bindings for listboxes that
- give them the following default behavior:
-
- [1]
- When button 1 is pressed over a listbox, the element
- underneath the mouse cursor is selected. The mouse can
- be dragged to select a range of elements.
-
-
- But how is this done? Can I define the same functionality for
- Button-3 using the bind command?
-
- ----------------------------------------------------------------------
- Richard Czech e-mail: czech@gmd.de
- GMD-I5-FIT
- P.O.Box 13 16 phone: (+49) 2241 14 2039
- D-5205 St. Augustin 1, Germany fax: (+49) 2241 14 2342
- ----------------------------------------------------------------------
-