Hi!
I am using the following (wxglade generated) code excerpt:
self.frame_main_menubar = wxMenuBar()
self.SetMenuBar(self.frame_main_menubar)
self.object_3 = wxMenu()
self.m_file_whois = wxMenuItem(self.object_3, wxNewId(), "&Whois
Server ...", "", wxITEM_NORMAL)
self.object_3.AppendItem(self.m_file_whois)
self.object_3.AppendSeparator()
self.m_file_quit = wxMenuItem(self.object_3, wxNewId(),
"&Quit\tCtrl+Q", "", wxITEM_NORMAL)
self.object_3.AppendItem(self.m_file_quit)
self.frame_main_menubar.Append(self.object_3, "&File")
Is there something else I need to do to make Alt-F open up the file
menu? I checked the wxpython-2.4(I am using the wxpython-2.4 debian
testing package) demo, and it appears to get the same functionality
without doing anything more.
What am I missing?
- Sandip
···
--
Sandip Bhattacharya * Puroga Technologies * sandip@puroga.com
Work: http://www.puroga.com * Home/Blog: http://www.sandipb.net/blog
PGP/GPG Signature: 51A4 6C57 4BC6 8C82 6A65 AE78 B1A1 2280 A129 0FF3
Hehe,
Funny the example code I dug up has whois in it. 1st off, your using old style namespace, whereas I'm using the newer wx. notation, though that should not be an issue. I wrote this on 2.4 and am now using 2.6... Some of the older style stuff gets broken when upgrading so I would recommend transitioning ASAP.
SetMenuBar() appears to be the only thing missing.
def _init_menu(self):
self.menubar = wx.MenuBar()
self.UtilMenu = wx.Menu()
self.Whois = wx.MenuItem(self.UtilMenu, -1, "&Whois")
self.UtilMenu.AppendItem(self.Whois)
self.menubar.Append(self.UtilMenu, "&Utils")
self.Bind(wx.EVT_MENU, self.OnMenu, self.Whois)
self.SetMenuBar(self.menubar)
Alt-U works in this example. This is an excerpt from class my(wx.Frame): definition.
-Joe
Sandip Bhattacharya wrote:
···
Hi!
I am using the following (wxglade generated) code excerpt:
self.frame_main_menubar = wxMenuBar()
self.SetMenuBar(self.frame_main_menubar)
self.object_3 = wxMenu()
self.m_file_whois = wxMenuItem(self.object_3, wxNewId(), "&Whois Server ...", "", wxITEM_NORMAL)
self.object_3.AppendItem(self.m_file_whois)
self.object_3.AppendSeparator()
self.m_file_quit = wxMenuItem(self.object_3, wxNewId(), "&Quit\tCtrl+Q", "", wxITEM_NORMAL)
self.object_3.AppendItem(self.m_file_quit)
self.frame_main_menubar.Append(self.object_3, "&File")
Is there something else I need to do to make Alt-F open up the file
menu? I checked the wxpython-2.4(I am using the wxpython-2.4 debian
testing package) demo, and it appears to get the same functionality
without doing anything more.
What am I missing?
- Sandip
Hi there,
without going into the lengthy details, could someone tell me in some steps on how to replace the normal text in the ticker widget with hyperlinks? I would like to be able to click on the text messages which moves across the ticker tape. The whole text of the ticker tape would consist of different messages though, meaning that you could have different URLs assigned to each message...
Thanks for any help,
Christophe Leske
While we're at it:
how do i prevent several task bar icons (i get several identical taskbar icons, probably due to the fact that when i close my window, they are not getting destroyed).
So, on a related note:
how do you "catch" the event of a window being cloes by a press on the "x" button on Windows? (because if i have access to this event, i could shove a "Destroy()" in there for my taskbar Icon, which would hopefully make it disappear...)
C
Joe Brown wrote:
Hehe,
Funny the example code I dug up has whois in it. 1st off, your using
old style namespace, whereas I'm using the newer wx. notation, though
that should not be an issue. I wrote this on 2.4 and am now using
2.6... Some of the older style stuff gets broken when upgrading so I
would recommend transitioning ASAP.
SetMenuBar() appears to be the only thing missing.
def _init_menu(self):
self.menubar = wx.MenuBar()
self.UtilMenu = wx.Menu()
self.Whois = wx.MenuItem(self.UtilMenu, -1, "&Whois")
self.UtilMenu.AppendItem(self.Whois)
self.menubar.Append(self.UtilMenu, "&Utils")
self.Bind(wx.EVT_MENU, self.OnMenu, self.Whois)
self.SetMenuBar(self.menubar)
The code I am working on is just a self-exercise to make me learn
wxpython. I am stuck with wxpython2.4 because of distro reasons - I cant
make my clients compile the latest wxwindows/wxpython stack. So I will
have to work around whatever is latest of these distros. I am using
Debian testing. That is odd enough keeping in mind my requirements.
BTW, SetMenuBar() was there in the code I had given before.
The only thing you have different in your code is self.Bind(). I am
using EVT_MENU(self,menu-item-id,func) for my menu item hooks. My menu
item hooks and accelerators are working. So i dont think the problem is
there.
What is Bind()? I dont see it in 2.4 docs?
- Sandip
···
--
Sandip Bhattacharya * Puroga Technologies * sandip@puroga.com
Work: http://www.puroga.com * Home/Blog: http://www.sandipb.net/blog
PGP/GPG Signature: 51A4 6C57 4BC6 8C82 6A65 AE78 B1A1 2280 A129 0FF3
Hi Christophe,
Check out the wxPython demo
self.Bind(wx.EVT_CLOSE, self.OnCloseWindow)
def OnCloseWindow(self, event):
self.dying = True
self.demoPage = None
self.codePage = None
self.mainmenu = None
self.tbicon.Destroy()
self.Destroy()
See you
Werner
Christophe Leske wrote:
···
While we're at it:
how do i prevent several task bar icons (i get several identical taskbar icons, probably due to the fact that when i close my window, they are not getting destroyed).
So, on a related note:
how do you "catch" the event of a window being cloes by a press on the "x" button on Windows? (because if i have access to this event, i could shove a "Destroy()" in there for my taskbar Icon, which would hopefully make it disappear...)
C
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
Argh,
There's been some really nice leaps since 2.4. The Bind syntax is one of them.
EVT_MENU() is macro style syntax used in 2.4 to bind the Menu event to a function call.
The Bind syntax was added in 2.5 by Robin Dunn which simplifies the coding and provides the ability to "bind" it to a specific object or "context".
···
--
Instead of forcing yourself to use a specific version of Python/wxPython, look into freeze distribution tools which allow you to bundle up the whole ball of wax for distribution to your clients. Py2Exe - Python Wiki
Then upgrade to the latest versions, to simplify your life.
-Joe
Sandip Bhattacharya wrote:
Joe Brown wrote:
Hehe,
Funny the example code I dug up has whois in it. 1st off, your using
old style namespace, whereas I'm using the newer wx. notation, though
that should not be an issue. I wrote this on 2.4 and am now using
2.6... Some of the older style stuff gets broken when upgrading so I
would recommend transitioning ASAP.
SetMenuBar() appears to be the only thing missing.
def _init_menu(self):
self.menubar = wx.MenuBar()
self.UtilMenu = wx.Menu()
self.Whois = wx.MenuItem(self.UtilMenu, -1, "&Whois")
self.UtilMenu.AppendItem(self.Whois)
self.menubar.Append(self.UtilMenu, "&Utils")
self.Bind(wx.EVT_MENU, self.OnMenu, self.Whois)
self.SetMenuBar(self.menubar)
The code I am working on is just a self-exercise to make me learn
wxpython. I am stuck with wxpython2.4 because of distro reasons - I cant
make my clients compile the latest wxwindows/wxpython stack. So I will
have to work around whatever is latest of these distros. I am using
Debian testing. That is odd enough keeping in mind my requirements.
BTW, SetMenuBar() was there in the code I had given before.
The only thing you have different in your code is self.Bind(). I am
using EVT_MENU(self,menu-item-id,func) for my menu item hooks. My menu
item hooks and accelerators are working. So i dont think the problem is
there.
What is Bind()? I dont see it in 2.4 docs?
- Sandip
Werner F. Bruhin wrote:
Hi Christophe,
Check out the wxPython demo
Is there a demo for taskbar Icons? I can't see it, where is it?
But thanks, the rest of the code works like a charm.
Danke,
Christophe Leske
Hallo Christophe,
I think, Werner meant the main.py from the demo directory itself.
You can also look at:
http://wiki.wxpython.org/index.cgi/FlashingTaskbarIcon
···
On Mon, 18 Jul 2005 12:20:35 +0200, Christophe Leske <leske@online.de> wrote:
Werner F. Bruhin wrote:
Hi Christophe,
Check out the wxPython demo
Is there a demo for taskbar Icons? I can't see it, where is it?
But thanks, the rest of the code works like a charm.
Danke,
Christophe Leske
--
Franz Steinhaeusler
Hi Christophe,
Christophe Leske wrote:
Werner F. Bruhin wrote:
Hi Christophe,
Check out the wxPython demo
Is there a demo for taskbar Icons? I can't see it, where is it?
The code is from the demo , open the demo and without selecting any control look at the Demo Code tab or open main.py in your prefered editor.
See you
Werner
···
But thanks, the rest of the code works like a charm.
Danke,
Christophe Leske
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
Hi there,
without going into the lengthy details, could someone tell me in some
steps on how to replace the normal text in the ticker widget with
hyperlinks? I would like to be able to click on the text messages
which moves across the ticker tape. The whole text of the ticker tape
would consist of different messages though, meaning that you could have
different URLs assigned to each message...
Thanks for any help,
Christophe Leske
The ticker as written can't do this - you could only emulate it by
catching click events on the ticker itself and then checking the
position to see which message was (probably) clicked on. This is
because the ticker draws its own text with low-level drawing functions
rather than scrolling a child window.
A version of the ticker which simply scrolls a child window (which
could be a composite of several controls, for example a panel of
andrea's hyperlink controls) is in the works.
···
On 7/18/05, Christophe Leske <leske@online.de> wrote:
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org