[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
adjacent push-button widgets and widget-button-pressed-face
From: |
Dan Nicolaescu |
Subject: |
adjacent push-button widgets and widget-button-pressed-face |
Date: |
Sat, 18 Mar 2006 10:10:46 -0800 |
Evaluate the code below and then do: M-x widget-test RET
Then place the mouse pointer over one of the buttons in the *TEST*
buffer. Both buttons will be highlighted instead of just the one that
has the mouse over it.
Wouldn't it be better to just highlight one button?
Does anybody know how to fix this?
Thanks
--dan
(defface widget-test-button-pressed
' ((((type x w32 mac) (class color))
(:box (:line-width 2 :style pressed-button)
:background "lightgrey " :foreground "black "))
(t
(:inverse-video t)))
"Face ")
(defvar widget-test-map nil)
(defun widget-test ()
(interactive)
(switch-to-buffer (get-buffer-create "*TEST* "))
(require 'wid-edit)
(setq widget-test-map (make-sparse-keymap))
(set-keymap-parent widget-test-map widget-keymap)
(suppress-keymap widget-test-map)
(use-local-map widget-test-map)
(set (make-local-variable 'widget-button-pressed-face)
'widget-test-button-pressed)
(widget-create 'push-button
:tag "prev "
:help-echo "prev "
:tag-glyph "prev-node "
:action
(lambda (widget &optional e) (message "prev pressed ")))
(widget-create 'push-button
:tag "next "
:help-echo "next "
:tag-glyph "next-node "
:action
(lambda (widget &optional e) (message "next pressed ")))
(widget-setup))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- adjacent push-button widgets and widget-button-pressed-face,
Dan Nicolaescu <=