On Nov 19, 10:30 am, kakarukeys <
kakaruk...@gmail.com> wrote:
> Hi All,
>
> I ran into a strange problem to which I don't have a solution. I am
> writing a systray application which minimizes itself to systray on
> program startup. When binding events to
>
> self.Show()
> self.Iconize(False)
>
> ONLY IF the event has special ID such as wx.ID_OPEN, then window will
> be activated. If the event has wx.ID_ANY, the window will show and un-
> minimize itself, but will not be on focus. This happens to the first
> time the event is sent, after that, the behavior returns to normal,
> i.e. window will always be on focus.
>
> I'm using
>
> Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit
> (Intel)] on win32
> wxPython 2.8.10.1 (msw-unicode)
>
> Does anyone have an idea how to make the window on focus once the
> event is sent?
>
> Code is as follows, please take any ico file as the py.ico.
> Double-clicking on the icon (event id = wx.ID_ANY will not set the
> window on focus.
> Right-click on the icon and Open (event id = wx.ID_OPEN will set the
> window on focus.
> Although both events are bound to a same method.
>
>
(unicode). You might try sticking a self.Raise() in the PopupMenu