Quantcast

Request for an example of using wx.NotificationMessage

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Request for an example of using wx.NotificationMessage

xp_prg
Hi All,

I have been studying some BaloonTip type stuff for a systray icon.  Based on my research a new class called wxNotificationMessage in trunk/src/_misc.i causes a Balloon Tip to show up on a systray icon.  Is that correct?  What is an example of its usage.  I was also reading that it would be put in 2.9 but I don't see it in there.  What is the 411?

-Tim

_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Request for an example of using wx.NotificationMessage

Mike Driscoll-2
Will / Tim,

> Hi All,
>
> I have been studying some BaloonTip type stuff for a systray icon.
>  Based on my research a new class called wxNotificationMessage in
> trunk/src/_misc.i causes a Balloon Tip to show up on a systray icon.
>  Is that correct?  What is an example of its usage.  I was also
> reading that it would be put in 2.9 but I don't see it in there.  What
> is the 411?
>
> -Tim

I assume you're talking about Andrea's BalloonTip that was released in
2.8.9.1 (I think). His widget appears to work through mouse events in
the demo. I used a mouse click event when I was playing with it a week
or two ago. Here's the code I used then:

<code>

import wx
from icon import getIcon
import wx.lib.agw.balloontip as BT

class MyTaskbarIcon(wx.TaskBarIcon):
     
    def __init__(self):
        wx.TaskBarIcon.__init__(self)
     
        tbIcon = getIcon()
        #icon = wx.Icon("pycon.ico", wx.BITMAP_TYPE_ICO)
        self.SetIcon(tbIcon, "Test Program")
     
        tipballoon = BT.BalloonTip(message="This is only a test!")
        tipballoon.SetTarget(self)
        tipballoon.SetStartDelay(1000)
     
if __name__ == "__main__":
    app = wx.PySimpleApp()
    tbicon = MyTaskbarIcon()
    app.MainLoop()
     
</code>

I don't know if that's what you were looking for or not though.

-------------------
Mike Driscoll

Blog:   http://blog.pythonlibrary.org

_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Request for an example of using wx.NotificationMessage

xp_prg
Hi Mike,

I am looking for a way to bring up the tip balloon without putting the mouse over the systray icon.  Do you know how to do that?

-Tim

On Mon, May 18, 2009 at 6:56 AM, Mike Driscoll <[hidden email]> wrote:
Will / Tim,

Hi All,

I have been studying some BaloonTip type stuff for a systray icon.  Based on my research a new class called wxNotificationMessage in trunk/src/_misc.i causes a Balloon Tip to show up on a systray icon.  Is that correct?  What is an example of its usage.  I was also reading that it would be put in 2.9 but I don't see it in there.  What is the 411?

-Tim

I assume you're talking about Andrea's BalloonTip that was released in 2.8.9.1 (I think). His widget appears to work through mouse events in the demo. I used a mouse click event when I was playing with it a week or two ago. Here's the code I used then:

<code>

import wx
from icon import getIcon
import wx.lib.agw.balloontip as BT

class MyTaskbarIcon(wx.TaskBarIcon):
      def __init__(self):
      wx.TaskBarIcon.__init__(self)
          tbIcon = getIcon()
      #icon = wx.Icon("pycon.ico", wx.BITMAP_TYPE_ICO)
      self.SetIcon(tbIcon, "Test Program")
          tipballoon = BT.BalloonTip(message="This is only a test!")
      tipballoon.SetTarget(self)
      tipballoon.SetStartDelay(1000)
    if __name__ == "__main__":
  app = wx.PySimpleApp()
  tbicon = MyTaskbarIcon()
  app.MainLoop()
    </code>

I don't know if that's what you were looking for or not though.

-------------------
Mike Driscoll

Blog:   http://blog.pythonlibrary.org

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


_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Request for an example of using wx.NotificationMessage

Mike Driscoll-2
William Heath wrote:
> Hi Mike,
>
> I am looking for a way to bring up the tip balloon without putting the
> mouse over the systray icon.  Do you know how to do that?
>
> -Tim

Hmmm...I tried making it pop-up using a button event, but that didn't
work. There doesn't seem to be a Show() method. Maybe Andrea can give us
a clue or add that functionality.

- Mike


>
> On Mon, May 18, 2009 at 6:56 AM, Mike Driscoll <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Will / Tim,
>
>         Hi All,
>
>         I have been studying some BaloonTip type stuff for a systray
>         icon.  Based on my research a new class called
>         wxNotificationMessage in trunk/src/_misc.i causes a Balloon
>         Tip to show up on a systray icon.  Is that correct?  What is
>         an example of its usage.  I was also reading that it would be
>         put in 2.9 but I don't see it in there.  What is the 411?
>
>         -Tim
>
>
>     I assume you're talking about Andrea's BalloonTip that was
>     released in 2.8.9.1 (I think). His widget appears to work through
>     mouse events in the demo. I used a mouse click event when I was
>     playing with it a week or two ago. Here's the code I used then:
>
>     <code>
>
>     import wx
>     from icon import getIcon
>     import wx.lib.agw.balloontip as BT
>
>     class MyTaskbarIcon(wx.TaskBarIcon):
>           def __init__(self):
>           wx.TaskBarIcon.__init__(self)
>               tbIcon = getIcon()
>           #icon = wx.Icon("pycon.ico", wx.BITMAP_TYPE_ICO)
>           self.SetIcon(tbIcon, "Test Program")
>               tipballoon = BT.BalloonTip(message="This is only a test!")
>           tipballoon.SetTarget(self)
>           tipballoon.SetStartDelay(1000)
>         if __name__ == "__main__":
>       app = wx.PySimpleApp()
>       tbicon = MyTaskbarIcon()
>       app.MainLoop()
>         </code>
>
>     I don't know if that's what you were looking for or not though.
>
>     -------------------
>     Mike Driscoll
>

_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Request for an example of using wx.NotificationMessage

xp_prg
Hi Mike,

I have added the functionality using the win32api, just wanted a more elegant approach.  I was told that the wxNotificationMessage could assist with this.  Can you remark on that possibility?  Would it help if I posted my code?

-Tim

On Mon, May 18, 2009 at 2:06 PM, Mike Driscoll <[hidden email]> wrote:
William Heath wrote:
Hi Mike,

I am looking for a way to bring up the tip balloon without putting the mouse over the systray icon.  Do you know how to do that?

-Tim

Hmmm...I tried making it pop-up using a button event, but that didn't work. There doesn't seem to be a Show() method. Maybe Andrea can give us a clue or add that functionality.

- Mike




On Mon, May 18, 2009 at 6:56 AM, Mike Driscoll <[hidden email] <mailto:[hidden email]>> wrote:

   Will / Tim,

       Hi All,

       I have been studying some BaloonTip type stuff for a systray
       icon.  Based on my research a new class called
       wxNotificationMessage in trunk/src/_misc.i causes a Balloon
       Tip to show up on a systray icon.  Is that correct?  What is
       an example of its usage.  I was also reading that it would be
       put in 2.9 but I don't see it in there.  What is the 411?

       -Tim


   I assume you're talking about Andrea's BalloonTip that was
   released in 2.8.9.1 (I think). His widget appears to work through
   mouse events in the demo. I used a mouse click event when I was
   playing with it a week or two ago. Here's the code I used then:

   <code>

   import wx
   from icon import getIcon
   import wx.lib.agw.balloontip as BT

   class MyTaskbarIcon(wx.TaskBarIcon):
         def __init__(self):
         wx.TaskBarIcon.__init__(self)
             tbIcon = getIcon()
         #icon = wx.Icon("pycon.ico", wx.BITMAP_TYPE_ICO)
         self.SetIcon(tbIcon, "Test Program")
             tipballoon = BT.BalloonTip(message="This is only a test!")
         tipballoon.SetTarget(self)
         tipballoon.SetStartDelay(1000)
       if __name__ == "__main__":
     app = wx.PySimpleApp()
     tbicon = MyTaskbarIcon()
     app.MainLoop()
       </code>

   I don't know if that's what you were looking for or not though.

   -------------------
   Mike Driscoll


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


_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Request for an example of using wx.NotificationMessage

Robin Dunn
In reply to this post by xp_prg
William Heath wrote:
> Hi All,
>
> I have been studying some BaloonTip type stuff for a systray icon.
>  Based on my research a new class called wxNotificationMessage in
> trunk/src/_misc.i causes a Balloon Tip to show up on a systray icon.  Is
> that correct?  What is an example of its usage.  I was also reading that
> it would be put in 2.9 but I don't see it in there.  What is the 411?

The wxPython trunk in SVN is 2.9, but there are no snapshots, previews
or releases of any 2.9.x yet (although it shouldn't be too much longer)
so in order to see it currently you'll need to get the code and built it
yourself.

--
Robin Dunn
Software Craftsman
http://wxPython.org

_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Request for an example of using wx.NotificationMessage

Andrea Gavana
In reply to this post by Mike Driscoll-2
Hi All,

On Mon, May 18, 2009 at 10:06 PM, Mike Driscoll wrote:

> William Heath wrote:
>>
>> Hi Mike,
>>
>> I am looking for a way to bring up the tip balloon without putting the
>> mouse over the systray icon.  Do you know how to do that?
>>
>> -Tim
>
> Hmmm...I tried making it pop-up using a button event, but that didn't work.
> There doesn't seem to be a Show() method. Maybe Andrea can give us a clue or
> add that functionality.

Unfortunatly wx.TaskBarIcon doesn't expose that many methods to play
with, and specifically there is no way to find out where the taskbar
icon is (no positioning information in wx.TaskBarIcon class). The only
way to do that is to code it using the win32api on Windows (and you'll
get native balloontips, not crappy ones line mine with BalloonTip
:-D), or to wait for the 2.9 series in which (I think) there should be
this functionality implemented in wxWidgets/wxPython.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/
http://thedoomedcity.blogspot.com/
_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Request for an example of using wx.NotificationMessage

Mike Driscoll-2
In reply to this post by xp_prg
William Heath wrote:
> Hi Mike,
>
> I have added the functionality using the win32api, just wanted a more
> elegant approach.  I was told that the wxNotificationMessage could
> assist with this.  Can you remark on that possibility?  Would it help
> if I posted my code?
>
> -Tim

Alas. I have not used "wxNotificationMessage" for anything, so my only
remark is "no comment". See Andrea's post for what he had to say on the
subject. It sounds like the 2.9 branch will include more functionality
(see both Andrea's and Robin's posts).

- Mike



>
> On Mon, May 18, 2009 at 2:06 PM, Mike Driscoll <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     William Heath wrote:
>
>         Hi Mike,
>
>         I am looking for a way to bring up the tip balloon without
>         putting the mouse over the systray icon.  Do you know how to
>         do that?
>
>         -Tim
>
>
>     Hmmm...I tried making it pop-up using a button event, but that
>     didn't work. There doesn't seem to be a Show() method. Maybe
>     Andrea can give us a clue or add that functionality.
>
>     - Mike
>
>
>
>
>         On Mon, May 18, 2009 at 6:56 AM, Mike Driscoll
>         <[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>> wrote:
>
>            Will / Tim,
>
>                Hi All,
>
>                I have been studying some BaloonTip type stuff for a
>         systray
>                icon.  Based on my research a new class called
>                wxNotificationMessage in trunk/src/_misc.i causes a Balloon
>                Tip to show up on a systray icon.  Is that correct?
>          What is
>                an example of its usage.  I was also reading that it
>         would be
>                put in 2.9 but I don't see it in there.  What is the 411?
>
>                -Tim
>
>
>            I assume you're talking about Andrea's BalloonTip that was
>            released in 2.8.9.1 (I think). His widget appears to work
>         through
>            mouse events in the demo. I used a mouse click event when I was
>            playing with it a week or two ago. Here's the code I used then:
>
>            <code>
>
>            import wx
>            from icon import getIcon
>            import wx.lib.agw.balloontip as BT
>
>            class MyTaskbarIcon(wx.TaskBarIcon):
>                  def __init__(self):
>                  wx.TaskBarIcon.__init__(self)
>                      tbIcon = getIcon()
>                  #icon = wx.Icon("pycon.ico", wx.BITMAP_TYPE_ICO)
>                  self.SetIcon(tbIcon, "Test Program")
>                      tipballoon = BT.BalloonTip(message="This is only
>         a test!")
>                  tipballoon.SetTarget(self)
>                  tipballoon.SetStartDelay(1000)
>                if __name__ == "__main__":
>              app = wx.PySimpleApp()
>              tbicon = MyTaskbarIcon()
>              app.MainLoop()
>                </code>
>
>            I don't know if that's what you were looking for or not though.
>
>            -------------------
>            Mike Driscoll
>

_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Request for an example of using wx.NotificationMessage

xp_prg
wxNotificationMessage exists in the trunk.  It is not possible to see an example of its usage?  How can this be?

-Tim

P.S.

Thanks for assisting with this :)

On Tue, May 19, 2009 at 6:28 AM, Mike Driscoll <[hidden email]> wrote:
William Heath wrote:
Hi Mike,

I have added the functionality using the win32api, just wanted a more elegant approach.  I was told that the wxNotificationMessage could assist with this.  Can you remark on that possibility?  Would it help if I posted my code?

-Tim

Alas. I have not used "wxNotificationMessage" for anything, so my only remark is "no comment". See Andrea's post for what he had to say on the subject. It sounds like the 2.9 branch will include more functionality (see both Andrea's and Robin's posts).

- Mike




On Mon, May 18, 2009 at 2:06 PM, Mike Driscoll <[hidden email] <mailto:[hidden email]>> wrote:

   William Heath wrote:

       Hi Mike,

       I am looking for a way to bring up the tip balloon without
       putting the mouse over the systray icon.  Do you know how to
       do that?

       -Tim


   Hmmm...I tried making it pop-up using a button event, but that
   didn't work. There doesn't seem to be a Show() method. Maybe
   Andrea can give us a clue or add that functionality.

   - Mike




       On Mon, May 18, 2009 at 6:56 AM, Mike Driscoll
       <[hidden email] <mailto:[hidden email]>
       <mailto:[hidden email]

       <mailto:[hidden email]>>> wrote:

          Will / Tim,

              Hi All,

              I have been studying some BaloonTip type stuff for a
       systray
              icon.  Based on my research a new class called
              wxNotificationMessage in trunk/src/_misc.i causes a Balloon
              Tip to show up on a systray icon.  Is that correct?
        What is
              an example of its usage.  I was also reading that it
       would be
              put in 2.9 but I don't see it in there.  What is the 411?

              -Tim


          I assume you're talking about Andrea's BalloonTip that was
          released in 2.8.9.1 (I think). His widget appears to work
       through
          mouse events in the demo. I used a mouse click event when I was
          playing with it a week or two ago. Here's the code I used then:

          <code>

          import wx
          from icon import getIcon
          import wx.lib.agw.balloontip as BT

          class MyTaskbarIcon(wx.TaskBarIcon):
                def __init__(self):
                wx.TaskBarIcon.__init__(self)
                    tbIcon = getIcon()
                #icon = wx.Icon("pycon.ico", wx.BITMAP_TYPE_ICO)
                self.SetIcon(tbIcon, "Test Program")
                    tipballoon = BT.BalloonTip(message="This is only
       a test!")
                tipballoon.SetTarget(self)
                tipballoon.SetStartDelay(1000)
              if __name__ == "__main__":
            app = wx.PySimpleApp()
            tbicon = MyTaskbarIcon()
            app.MainLoop()
              </code>

          I don't know if that's what you were looking for or not though.

          -------------------
          Mike Driscoll


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


_______________________________________________
wxpython-users mailing list
[hidden email]
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Request for an example of using wx.NotificationMessage

Mike Driscoll-2
William Heath wrote:
> wxNotificationMessage exists in the trunk.  It is not possible to see
> an example of its usage?  How can this be?

It's quite simple: 2.9 isn't out yet so no one has used it except for
the core developers that are writing and testing it. The only way for
developers outside of the core dev group to use this method is to
download and install a preview version of 2.9.

Note that you are on the wxpython-users list, which is for developers
that use wxPython to build GUIs. There are a few core developers on here
as well, but it is mainly just "normal" and new developers. Once 2.9 is
released, there will probably be an example in the Demo.

- Mike

>
> -Tim
>
> P.S.
>
> Thanks for assisting with this :)
>
> On Tue, May 19, 2009 at 6:28 AM, Mike Driscoll <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     William Heath wrote:
>
>         Hi Mike,
>
>         I have added the functionality using the win32api, just wanted
>         a more elegant approach.  I was told that the
>         wxNotificationMessage could assist with this.  Can you remark
>         on that possibility?  Would it help if I posted my code?
>
>         -Tim
>
>
>     Alas. I have not used "wxNotificationMessage" for anything, so my
>     only remark is "no comment". See Andrea's post for what he had to
>     say on the subject. It sounds like the 2.9 branch will include
>     more functionality (see both Andrea's and Robin's posts).
>
>     - Mike
>
>
>
>
>         On Mon, May 18, 2009 at 2:06 PM, Mike Driscoll
>         <[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email]
>         <mailto:[hidden email]>>> wrote:
>
>            William Heath wrote:
>
>                Hi Mike,
>
>                I am looking for a way to bring up the tip balloon without
>                putting the mouse over the systray icon.  Do you know
>         how to
>                do that?
>
>                -Tim
>
>
>            Hmmm...I tried making it pop-up using a button event, but that
>            didn't work. There doesn't seem to be a Show() method. Maybe
>            Andrea can give us a clue or add that functionality.
>
>            - Mike
>
>
>
>
>                On Mon, May 18, 2009 at 6:56 AM, Mike Driscoll
>                <[hidden email] <mailto:[hidden email]>
>         <mailto:[hidden email] <mailto:[hidden email]>>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>
>
>                <mailto:[hidden email]
>         <mailto:[hidden email]>>>> wrote:
>
>                   Will / Tim,
>
>                       Hi All,
>
>                       I have been studying some BaloonTip type stuff for a
>                systray
>                       icon.  Based on my research a new class called
>                       wxNotificationMessage in trunk/src/_misc.i
>         causes a Balloon
>                       Tip to show up on a systray icon.  Is that correct?
>                 What is
>                       an example of its usage.  I was also reading that it
>                would be
>                       put in 2.9 but I don't see it in there.  What is
>         the 411?
>
>                       -Tim
>
>
>                   I assume you're talking about Andrea's BalloonTip
>         that was
>                   released in 2.8.9.1 (I think). His widget appears to
>         work
>                through
>                   mouse events in the demo. I used a mouse click event
>         when I was
>                   playing with it a week or two ago. Here's the code I
>         used then:
>
>                   <code>
>
>                   import wx
>                   from icon import getIcon
>                   import wx.lib.agw.balloontip as BT
>
>                   class MyTaskbarIcon(wx.TaskBarIcon):
>                         def __init__(self):
>                         wx.TaskBarIcon.__init__(self)
>                             tbIcon = getIcon()
>                         #icon = wx.Icon("pycon.ico", wx.BITMAP_TYPE_ICO)
>                         self.SetIcon(tbIcon, "Test Program")
>                             tipballoon = BT.BalloonTip(message="This
>         is only
>                a test!")
>                         tipballoon.SetTarget(self)
>                         tipballoon.SetStartDelay(1000)
>                       if __name__ == "__main__":
>                     app = wx.PySimpleApp()
>                     tbicon = MyTaskbarIcon()
>                     app.MainLoop()
>                       </code>
>
>                   I don't know if that's what you were looking for or
>         not though.
>
>                   -------------------
>                   Mike Driscoll
>

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