From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Change image upon mouse hover Date: Wed, 06 Dec 2023 05:26:34 +0200 Message-ID: <83v89c3tat.fsf@gnu.org> References: <834jgw6byd.fsf@gnu.org> <75069cb4-f9bd-4834-bf0d-38a23c331073@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34164"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 06 04:27:17 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rAiZB-0008dT-I4 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 06 Dec 2023 04:27:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rAiYS-0004Vx-IW; Tue, 05 Dec 2023 22:26:32 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAiYQ-0004VN-Bs for help-gnu-emacs@gnu.org; Tue, 05 Dec 2023 22:26:30 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rAiYM-0006hu-Df for help-gnu-emacs@gnu.org; Tue, 05 Dec 2023 22:26:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=j4a61OdnE/cmxbob/YW3JTWk2LsMzF9G7AmJUtJiGbI=; b=SIAgFmb1Ae0S wAmmKUPcuFmtjmRjL9sUlhTT2hhAWigQiPeIobBDmDuKDNndkLvBZlNK7HDOk39nXGsyX9yGLa5Q3 nz5QlU7/KWvBOzYB77Dj3S/iZg8JhJVxe5Qy0R1sOngbi+iE3vhMRTz/Q9Sl2Vwxn5exEUx336Va6 bzbUSOyJgyRP7o/t1nl8JSCXuQh0733wEYM/z5qFkN9oorwntYUXrwOB1BkPb8ZVfxD6V/OPxoH54 Ny/DB33bqD75t+QDnIUqhIOipml5yJ0PYxO7RNqupp25IC9CQ6djNVUqsXE+pGvm+ZADRXIJJxDcD 1tE+uXnFBlrNRjmjsdeN+A==; In-Reply-To: <75069cb4-f9bd-4834-bf0d-38a23c331073@gmail.com> (message from Yuan Fu on Tue, 5 Dec 2023 13:24:29 -0800) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:145624 Archived-At: > Date: Tue, 5 Dec 2023 13:24:29 -0800 > From: Yuan Fu > > >> I want to change the left one to the right one when mouse hovers over > >> it. Is it possible? What's the best way to do it? > > Did you try to use the help-echo text property? Its value can be a > > function, see "Special Properties" in the ELisp manual. > > > Thanks, this works brilliantly! However, now I realized that there's > another problem: I need to change the image back to the one with no > background when cursor leaves the button. I guess you'd need a timer to do that?