OK, I've tried both, and neither has any effect. Is this working for anyone? Am I doing something stupid here? I've verified that the 'frame' reference is indeed a reference to the frame that contains the event handler, so what else could be the problem here?
Trying to get the new Bind() working in 2.5.1.5, GTK2 without success. Here's the code sample I'm using:
import wx
class FileMenu(wx.Menu):
def __init__(self, frame):
wx.Menu.__init__(self)
exitID = wx.NewId()
exitItem = wx.MenuItem(self, exitID, "E&xit", "Outta Here")
self.AppendItem(exitItem)
wx.App_SetMacExitMenuItemId(exitID) self.Bind(wx.EVT_MENU, frame.onFileExit, exitItem, exitID)
OK, I've tried both, and neither has any effect. Is this working for anyone? Am I doing something stupid here? I've verified that the 'frame' reference is indeed a reference to the frame that contains the event handler, so what else could be the problem here?
Appologies if I'm off base here, but you may have missed Robin's point. Your original example used the format:
The difference is that when using an ID, you *must* specifiy the 'id' keyword. Otherwise Bind() assumes that the next arg is an object. (Actually, I'm amazed it didn't throw an exception since an ID doesn't have a 'GetId() method).
The difference is that when using an ID, you *must* specifiy the 'id' keyword. Otherwise Bind() assumes that the next arg is an object. (Actually, I'm amazed it didn't throw an exception since an ID doesn't have a 'GetId() method).
try sys.argv (see sys module documentation from python documentation) maybe is what you're loooking for. Alternatively you could tell us what do you need SystemParametersInfo for.
···
On Wed, 7 Apr 2004 20:05:29 +0530, GopinathR <gop@srasys.co.in> wrote:
Can anyone tell me what is the equivalent of SystemParametersInfo used in
wxPython.
Someone just pointed out to me off-list that if I change the line:
self.Bind(wx.EVT_MENU, frame.onFileExit, exitItem)
to:
frame.Bind(wx.EVT_MENU, frame.onFileExit, exitItem)
it will work, and I've verified that it does. Is this correct behavior? I haven't had a need to use any other object reference other than 'self' to get Bind to work anywhere else.
Trying to get the new Bind() working in 2.5.1.5, GTK2 without success. Here's the code sample I'm using:
import wx
class FileMenu(wx.Menu):
def __init__(self, frame):
wx.Menu.__init__(self)
exitID = wx.NewId()
exitItem = wx.MenuItem(self, exitID, "E&xit", "Outta Here")
self.AppendItem(exitItem)
wx.App_SetMacExitMenuItemId(exitID) self.Bind(wx.EVT_MENU, frame.onFileExit, exitItem, exitID)
using the win32api, I couldnot able to find 'SystemParametersInfo'.
(The sys module didnot help me. I tried it just now.)
awaiting for your reply.
Bye
Gop.
···
----- Original Message -----
From: "Peter Damoc" <pdamoc@gmx.net>
To: <wxPython-users@lists.wxwidgets.org>
Sent: Wednesday, April 07, 2004 9:01 PM
Subject: Re: [wxPython-users] equivalent of SystemParametersInfo
On Wed, 7 Apr 2004 20:05:29 +0530, GopinathR <gop@srasys.co.in> wrote:
> Can anyone tell me what is the equivalent of SystemParametersInfo used
in
> wxPython.
>
> Thanks
> Gop
try sys.argv (see sys module documentation from python documentation)
maybe is what you're loooking for. Alternatively you could tell us what do
you need SystemParametersInfo for.
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
I tried for SPI_SETMOUSESPEED, it seems to me like the mouse speed does not
change.
what can I do for that to achieve.
awaiting for your reply,
-Gop
···
----- Original Message -----
From: "Thomas Heller" <theller@python.net>
To: <wxpython-users@lists.wxwindows.org>
Sent: Thursday, April 08, 2004 12:46 AM
Subject: [wxPython-users] Re: equivalent of SystemParametersInfo
"GopinathR" <gop@srasys.co.in> writes:
> Thanks for your reply. Im looking for help regarding Mouse. I want to
set
> the speed of the mouse using the code
>
> SystemParametersInfo(win32con.SPI_GETMOUSESPEED, 0, oldSpeed, 0)
>
> using the win32api, I couldnot able to find 'SystemParametersInfo'.
>
> (The sys module didnot help me. I tried it just now.)
To call functions not wrapped by the win32 extensions, the easiest is to
use ctypes:
"""
import win32con
from ctypes import windll, byref, c_int
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
----- Original Message -----
From: "GopinathR" <gop@srasys.co.in>
To: <wxPython-users@lists.wxwidgets.org>
Sent: Thursday, April 08, 2004 1:19 AM
Subject: Re: [wxPython-users] Re: equivalent of SystemParametersInfo
I tried for SPI_SETMOUSESPEED, it seems to me like the mouse speed does
not
change.
what can I do for that to achieve.
awaiting for your reply,
-Gop
----- Original Message -----
From: "Thomas Heller" <theller@python.net>
To: <wxpython-users@lists.wxwindows.org>
Sent: Thursday, April 08, 2004 12:46 AM
Subject: [wxPython-users] Re: equivalent of SystemParametersInfo
> "GopinathR" <gop@srasys.co.in> writes:
>
> > Thanks for your reply. Im looking for help regarding Mouse. I want to
set
> > the speed of the mouse using the code
> >
> > SystemParametersInfo(win32con.SPI_GETMOUSESPEED, 0, oldSpeed, 0)
> >
> > using the win32api, I couldnot able to find 'SystemParametersInfo'.
> >
> > (The sys module didnot help me. I tried it just now.)
>
> To call functions not wrapped by the win32 extensions, the easiest is to
> use ctypes:
>
> """
> import win32con
> from ctypes import windll, byref, c_int
>
> speed = c_int()
> windll.user32.SystemParametersInfoA(win32con.SPI_GETMOUSESPEED, 0,
> byref(speed), 0)
> print speed
> print speed.value
> """
>
> Thomas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
Someone just pointed out to me off-list that if I change the line:
self.Bind(wx.EVT_MENU, frame.onFileExit, exitItem)
to:
frame.Bind(wx.EVT_MENU, frame.onFileExit, exitItem)
it will work, and I've verified that it does. Is this correct behavior? I haven't had a need to use any other object reference other than 'self' to get Bind to work anywhere else.
I believe that's the magic formula. The menu (and I think toolbar) events 'belong' to the frame; I think I encountered this during early 2.5 development and Robin explained it. Sorry about forgetting that, but glad you got it working
... WARNING: This computer attracts every other piece of matter in
the universe, including the products of other computer
companies with a force proportional to the product of the
masses and inversely proportional to the square of the
distance between them.
Hi All,
Here is a piece of code for drawing a line using DC. When I create the Pen,
and use the dc.SelectObject, the following error occours.
if win32con.WM_ERASEBKGND:
dc = win32ui.CreateDCFromHandle(self.windowHWnd)
win32gui.GetClientRect(self.windowHWnd)
This looks like you're trying to use a native Win32 DC, rather than a wxPython DC. If that's what you intend, this isn't the right list for that kind of question.
In fact, I don't see any wxPython code here. If you do want to use wxPython, check out the Wiki the demo, and then come here with a question if there is something you can't figure out.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Hi All,
To draw a rectangle around a window, that changes everytime w.r t the
location of the window (works exactly like Accessible Explorer), I use
CreateWindowEx. The Window pops up exactly at the same location, but I could
not draw a frame around the window, moreover the window pops up with a title
bar every time. Anybody having worked in DC can help me out.
Hi All,
To draw a rectangle around a window, that changes everytime w.r t the
location of the window (works exactly like Accessible Explorer), I use
CreateWindowEx. The Window pops up exactly at the same location, but I could
not draw a frame around the window, moreover the window pops up with a title
bar every time. Anybody having worked in DC can help me out.
What exactly are you trying to do, and why do you need CreateWindowEx to do it?
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!