Re: How do you make a button out of xpm(pxmap)?



On Wednesday 04 Jun 2003 3:01 pm, hp nadig wrote:
Somebody please help me on this:

I'm writing an app which requires an xpm (pixmap) as
image for button ( I hope you got this.. )
 and when that image is clicked..

I need to replace that image with another xpm of same
size with my function executed meanwhile...
( hope I'm clear on this too.. )

(The pixmap has not been inserted in a button widget)


Now I've drawn the pixmap, but all my attempts to
connect it to a signal handler went in vain... I tried
button_press_event, button_release_event etc.
Nothing worked..


Is there anything else I can do to achieve this?

Your problem arises because a pixmap does not have events associated with it.  
Perhaps the simplest solution to your problem is to place the pixmap in an 
event box which will then respond to events when the pixmap is clicked for 
example.

Ian




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]