[wxpython-users] possible to make transparent/invisible button?

wxPython user mailing list, post #18,564
Author:
Date:
Subject:
 Alec Bennett
 2008-07-20 04:39:39
 [wxpython-users] possible to make transparent/invisible button?
I have a complicated background image, and instead of breaking out the button graphics into separate buttons, I was thinking it'd be much easier to just place transparent buttons where I need to capture clicks.

Does anyone have any pointers on making transparent buttons? I found this code but it doesn't even look like Python to me:

http://lists.wxwidgets.org/pipermail/wxpython-users/2004-October/033314.html





_______________________________________________
wxpython-users mailing list
[email protected]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Author:
Date:
Subject:
 Ned Batchelder
 2008-07-20 09:23:11
 Re: [wxpython-users] possible to make transparent/invisible button?
I don't know about transparent buttons, but perhaps you could capture
the LEFT_UP events, and compare the coordinates of the click to your own
list of rectangles of interest. Then you can invoke the handler for the
rectangle. It wouldn't be too difficult, and gets you out of trying to
trick wxPython into doing what you want with transparent buttons.

The code you found is C++, BTW.

--Ned.
http://nedbatchelder.com

Alec Bennett wrote:
> I have a complicated background image, and instead of breaking out the button graphics into separate buttons, I was thinking it'd be much easier to just place transparent buttons where I need to capture clicks.
>
> Does anyone have any pointers on making transparent buttons? I found this code but it doesn't even look like Python to me:
>
> http://lists.wxwidgets.org/pipermail/wxpython-users/2004-October/033314.html
>
>
>
>
>
> _______________________________________________
> wxpython-users mailing list
> [email protected]
> http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
>
>
>
>


_______________________________________________
wxpython-users mailing list
[email protected]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Author:
Date:
Subject:
 Dominique
 2008-07-20 14:38:19
 [wxpython-users] Re: possible to make transparent/invisible button?
Ned Batchelder <ned <at> nedbatchelder.com> writes:

>
> I don't know about transparent buttons

Hi,

You can hide or show the button if it's sufficient: button.Hide() or
button.Show()

Dominique


_______________________________________________
wxpython-users mailing list
[email protected]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Author:
Date:
Subject:
 Werner F. Bruhin
 2008-07-20 16:55:08
 Re: [wxpython-users] possible to make transparent/invisible button?
Alec,

Alec Bennett wrote:
> I have a complicated background image, and instead of breaking out the button graphics into separate buttons, I was thinking it'd be much easier to just place transparent buttons where I need to capture clicks.
>
> Does anyone have any pointers on making transparent buttons? I found this code but it doesn't even look like Python to me:
>
> http://lists.wxwidgets.org/pipermail/wxpython-users/2004-October/033314.html
>
Have you seen the PlateButton from Cody Precord, maybe that would work
for you. It is included with wxPython 2.8.8 (not sure if this is the
first show of it), so you can check it out in the wxPython demo.

Werner
_______________________________________________
wxpython-users mailing list
[email protected]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users