[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: incorrect button highlighting
From: |
Glenn Morris |
Subject: |
Re: incorrect button highlighting |
Date: |
Mon, 17 Sep 2007 02:20:20 -0400 |
User-agent: |
Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) |
Dan Nicolaescu wrote:
> No put the mouse over one of the 2 buttons that appear, and both will
> be shown using the custom-button-pressed face instead of just the one
> that is under the mouse cursor.
I think this is a documented limitation of the widget library. From
the "User Interface" section of the widget manual:
*Warning:* In an `editable-field' widget, the editable field must
not be adjacent to another widget--that won't work. You must put
some text in between. Either make this text part of the
`editable-field' widget itself, or insert it with `widget-insert'.
Admittedly, I don't really see that your example is an "editable
field" one, but if you try:
(require 'cus-edit)
(defun foo ()
(interactive)
(switch-to-buffer "*Widget Example*")
(set (make-local-variable 'widget-button-pressed-face) custom-button-pressed)
(widget-create 'push-button
:tag "prev"
:help-echo "prev"
:tag-glyph "prev-node"
:action (lambda (widget &optional e) (ding)))
(insert " ")
(widget-create 'push-button
:tag "next"
:help-echo "next"
:tag-glyph "next-node"
:action (lambda (widget &optional e) (ding)))
(widget-setup))
M-x foo
then it works ok if you insert a space between the two widgets, but
not if you don't.
- incorrect button highlighting, Dan Nicolaescu, 2007/09/11
- Re: incorrect button highlighting,
Glenn Morris <=
- Re: incorrect button highlighting, Glenn Morris, 2007/09/20
- Re: incorrect button highlighting, Stephen Berman, 2007/09/20
- Re: incorrect button highlighting, Stefan Monnier, 2007/09/20
- Re: incorrect button highlighting, Richard Stallman, 2007/09/21
- Re: incorrect button highlighting, Stefan Monnier, 2007/09/21
- Re: incorrect button highlighting, Richard Stallman, 2007/09/22
Re: incorrect button highlighting, Stefan Monnier, 2007/09/20