Re: FVWM: FvwmButtons Icon change on button click

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Mon, 20 Jan 2003 11:40:16 +0000

On 19 Jan 2003 15:18:51 +0530, subbiah .L wrote:
>
> I am using Suse Linux 6.4 with fvwm 2.4.3. I am having default windows 95
> style in my desktop. If I press some BarButtons(using FvwmButtons), then
> the Icon has to change. (i.e) If the application is opened, then the icon
> has to change to some other to indicate the application is opened. Is it
> possible with fvwm?. If so please help me.

If you use 2.5.4+, you may do this, see the man page of FvwmButtons.
In short you should use:

  SendToModule FvwmButtons ChangeButton my_button Icon new_icon.png, ...

whenever you want to change an icon.

I would use FvwmEvent in your case, on add_window you may change the icon
and on destroy_window you may restore it. Something like:

  *FvwmEvent: Cmd
  *FvwmEvent: PassId
  *FvwmEvent: add_window SetButton1IconTo new_image.png
  *FvwmEvent: destroy_window SetButton1IconTo old_image.png

  AddToFunc SetButton1IconTo
  + I WindowId $1 ("my_app") SendToModule FvwmButtons \
        ChangeButton button1 Icon $0

Sorry, this is not tested, but I think it should work.

Regards,
Mikhael.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Mon Jan 20 2003 - 05:43:00 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:54 BST