[wxPython-users] Skinnable interface in (wx)Python?
Peter Damoc
pdamoc at gmail.com
Mon Oct 2 23:19:12 PDT 2006
Well... I guess it depends on what would you consider "an easy way"...
There is no official way (a specialized control) but... if you want to make
such a beast... it wouldn't be too hard and it would be a great contribution
to the toolkit...
The way I would do it is like this:
1. A custom wx.Panel with 2 or 3 bitmaps (normal, mouse_over and activated)
stored them in some internal bitmaps
2. Handlers for Mouse events that would trigger repaints.
3. a custom wx.EVT_PAINT that checks to see if the mouse is in one of the
rectangles from a predefined list of rectangles (the rough area of the
button) and blits the appropriate rectangle from the appropriate bitmap
(mouse_over or activated).
Of course you can implement this in other toolkits like pygame BUT the main
advantage of doing this is in wxpython is that we have here a great
community and you WILL get help if you need it. I believe people would love
such a control and so... you might get even contributions for optimization
and such.
Peter.
On 10/3/06, Karlo Lozovina <karlo.lozovina at gmail.com> wrote:
>
> Is there an easy way of making a skinnable and rather fancy looking
> interface using wxPython? Lets say something like Windows Media
> Player, BSPlayer, and such? I would really like to use wxPython, since
> I already used it succesfully on some other projects, but if wxPython
> is not suitable for such a task, I'm wondering is there some other
> Python alternative?
>
> Thanks for all your suggestions :).
>
> --
> Karlo Lozovina -- Mosor
> "Parce mihi domine quia Dalmata sum."
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
>
-- =
There is NO FATE, we are the creators.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200610=
03/ee676f74/attachment.htm
More information about the wxpython-users
mailing list