Python

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • MouseOver Effect

    3 answers - 867 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hey All,
    I've got a wx.Panel with 3 children controls. I'm trying to create a
    mouseover effect on the panel so when the mouse is over the panel (and
    hence any of the children controls) the hand cursor is shown.
    The problem I am having is that when mouse goes over one of the children
    controls I get a EVT_LEAVE_WINDW on the panel and an EVT_ENTER_WINDW
    on the child control.
    Is there a way to make the child controls be transparent to this? The
    controls in question are just a couple of wx.StaticBitmaps and a
    wx.StaticText.
    Any ideas greatly appreciated!
    Regards
    Darryl
    PS. Got a phone call from my bookstore today, my copy of WxPython in
    Action has arrived, yay!
    PGP SIGNATURE
    Version: GnuPG v1.4.3 (MingW32)
    z99hSQgot5/tAk8sJwHSTis=
    =KFdg
    PGP SIGNATURE
  • No.1 | | 1110 bytes | |

    Fri, 12 May 2006 14:31:35 +0930, Darryl Ross <spam (AT) afoyi (DOT) comwrote:

    >Hey All,
    >
    >I've got a wx.Panel with 3 children controls. I'm trying to create a
    >mouseover effect on the panel so when the mouse is over the panel (and
    >hence any of the children controls) the hand cursor is shown.
    >
    >The problem I am having is that when mouse goes over one of the children
    >controls I get a EVT_LEAVE_WINDW on the panel and an EVT_ENTER_WINDW
    >on the child control.
    >
    >Is there a way to make the child controls be transparent to this? The
    >controls in question are just a couple of wx.StaticBitmaps and a
    >wx.StaticText.
    >
    >Any ideas greatly appreciated!
    >
    >Regards
    >Darryl
    >
    >PS. Got a phone call from my bookstore today, my copy of WxPython in
    >Action has arrived, yay!


    Maybe you retrieve the mouse cursor coordinates.

    If they are in the range of the panel, then one could ignore that
    event; I mean not changing the cursor.
  • No.2 | | 1191 bytes | |

    Just to follow up this, I worked out what I was doing wrong. I'm now an
    official dumbarse :/

    I was calling the global wx.SetCursor() method instead of the
    wx.Window.SetCursor() method on my panel object instance.

    It's working as wanted now.

    Regards
    Darryl

    Darryl Ross wrote:
    Hey All,

    I've got a wx.Panel with 3 children controls. I'm trying to create a
    mouseover effect on the panel so when the mouse is over the panel (and
    hence any of the children controls) the hand cursor is shown.

    The problem I am having is that when mouse goes over one of the children
    controls I get a EVT_LEAVE_WINDW on the panel and an EVT_ENTER_WINDW
    on the child control.

    Is there a way to make the child controls be transparent to this? The
    controls in question are just a couple of wx.StaticBitmaps and a
    wx.StaticText.

    Any ideas greatly appreciated!

    Regards
    Darryl

    PS. Got a phone call from my bookstore today, my copy of WxPython in
    Action has arrived, yay!

    PGP SIGNATURE
    Version: GnuPG v1.4.3 (MingW32)

    Dh5CJfc99UQYeHaR65tWYs=
    =n9un
    PGP SIGNATURE
  • No.3 | | 1307 bytes | |

    Just to follow up this, I worked out what I was doing wrong. I'm now an
    official dumbarse :/

    I was calling the global wx.SetCursor() method instead of the
    wx.Window.SetCursor() method on my panel object instance.

    It's working as wanted now.

    Regards
    Darryl

    Darryl Ross wrote:
    Hey All,

    I've got a wx.Panel with 3 children controls. I'm trying to create a
    mouseover effect on the panel so when the mouse is over the panel (and
    hence any of the children controls) the hand cursor is shown.

    The problem I am having is that when mouse goes over one of the children
    controls I get a EVT_LEAVE_WINDW on the panel and an EVT_ENTER_WINDW
    on the child control.

    Is there a way to make the child controls be transparent to this? The
    controls in question are just a couple of wx.StaticBitmaps and a
    wx.StaticText.

    Any ideas greatly appreciated!

    Regards
    Darryl

    PS. Got a phone call from my bookstore today, my copy of WxPython in
    Action has arrived, yay!

    PGP SIGNATURE
    Version: GnuPG v1.4.3 (MingW32)

    Dh5CJfc99UQYeHaR65tWYs=
    =n9un
    PGP SIGNATURE

    PGP SIGNATURE
    Version: GnuPG v1.4.3 (MingW32)

    pLBduAeV/a+QICH76l7misc=
    =MozJ
    PGP SIGNATURE

Re: MouseOver Effect


max 4000 letters.
Your nickname that display:
In order to stop the spam: 6 + 5 =
QUESTION ON "Python"

EMSDN.COM