Constructor. Initializes the custom colours to white, the data colour
setting to black, and the choose full setting to TRUE.
That seems to be incorrect, as the full dialog is not used if you use
wxColourData() as your data item. Also, I'm noting that the windows dialog
requires that you add a custom colour to the custom colour list in order to
use it. That's rather counter-intuitive. Possibly we'll need to work on a
better colour selection dialog (maybe something closer to Photoshop or
Corel's colour choosers).
I'm probably reporting something well-known, but on the off chance that
others have missed it: I have wxPython 2.2.5, and was attempting to use
wxGetClientSize(). When it didn't work, I checked the demo, and it uses
GetClientSize(), sans wx... Fine. Now I'll use it too, but it seemed
inconsistent to me. Am I correct in assuming that's an oversight in the
distribution? Or am I missing some reason that it doesn't have the wx
prefix?
···
--
Kevin Cole, RHCE, Linux Admin | E-mail: kjcole@gri.gallaudet.edu
Gallaudet Research Institute | WWW: http://gri.gallaudet.edu/~kjcole/
Hall Memorial Bldg S-419 | Voice: (202) 651-5135
Washington, D.C. 20002-3695 | FAX: (202) 651-5746
Thanks. Not to be dense or anything, but how come just about everything
else I look at in the docs appears to have the wx? (Or, asked another
way, what makes the GetClientSize stuff special?)
···
On Wed, 28 Mar 2001, Robin Dunn wrote:
> inconsistent to me. Am I correct in assuming that's an oversight in the
> distribution? Or am I missing some reason that it doesn't have the wx
> prefix?
It's a typo in the docs.
--
Kevin Cole, RHCE, Linux Admin | E-mail: kjcole@gri.gallaudet.edu
Gallaudet Research Institute | WWW: http://gri.gallaudet.edu/~kjcole/
Hall Memorial Bldg S-419 | Voice: (202) 651-5135
Washington, D.C. 20002-3695 | FAX: (202) 651-5746
> > inconsistent to me. Am I correct in assuming that's an oversight in
the
> > distribution? Or am I missing some reason that it doesn't have the wx
> > prefix?
>
> It's a typo in the docs.
Thanks. Not to be dense or anything, but how come just about everything
else I look at in the docs appears to have the wx? (Or, asked another
way, what makes the GetClientSize stuff special?)
Because GetClientSize is a method of wxWindow, not a top level function.
Everything at the top level of the namespace (classes, standalone functions,
constants, etc.) has a wx prefix, but not method names.
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!
> Thanks. Not to be dense or anything, but how come just about everything
> else I look at in the docs appears to have the wx? (Or, asked another
> way, what makes the GetClientSize stuff special?)
Because GetClientSize is a method of wxWindow, not a top level function.
Everything at the top level of the namespace (classes, standalone functions,
constants, etc.) has a wx prefix, but not method names.
> > Thanks. Not to be dense or anything, but how come just about
everything
> > else I look at in the docs appears to have the wx? (Or, asked another
> > way, what makes the GetClientSize stuff special?)
>
> Because GetClientSize is a method of wxWindow, not a top level function.
> Everything at the top level of the namespace (classes, standalone
functions,
> constants, etc.) has a wx prefix, but not method names.
In other words, I *AM* dense. Got it. Thanks.
Well, I tried to avoid saying that, but yes... <wink>
Never being one to shy away from displaying my ignorance... I was
looking for a way to center my main window on the screen, and thought I
understood how splashscreen.py was doing it. Apparently, I've missed
something yet again. I've tried a few different variants on the
following, and none seem to get it right. (I also experimented with
wxCentre, to no avail.)
···
-------------------------------------------------------------------
class MyFrame(wxFrame):
def __init__(self, parent, ID, title):
# Figure out size of screen (so we can center the window)
width = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_X)
height = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_Y)
pos = wxPoint((width-640)/2, (height-480)/2)
size = wxSize(640, 480)
wxFrame.__init__(self, parent, ID, title, pos, size)
-------------------------------------------------------------------
(I've only tried on my Linux box. It displays too far to the right,
even though the splash screen that I use later looks centered to me.
Haven't tried it on a Windoze box yet.)
On Wednesday, March 28, 2001 at 11:26:25 AM, Kevin Cole wrote:
Never being one to shy away from displaying my ignorance... I was
looking for a way to center my main window on the screen, and thought I
-------------------------------------------------------------------
class MyFrame(wxFrame):
def __init__(self, parent, ID, title):
# Figure out size of screen (so we can center the window)
width = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_X)
height = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_Y)
pos = wxPoint((width-640)/2, (height-480)/2)
size = wxSize(640, 480)
wxFrame.__init__(self, parent, ID, title, pos, size)
-------------------------------------------------------------------
Since 2.1.something (I think...) there's been a CentreonScreen method of
wxWindow's... which does exactly what it says, rather than centre on the
parent window, which may not be what you want for frames or dialogs...
Just my 4 cents worth! [Note the lamentable AUD/USD exchange rate...! :8-]
Chris
···
-------------------------------------------------------------------------
Chris Fama <mailto:Chris.Fama@whollysnakes.com> Phone:(07) 3870 5639
Brisbane, Australia Mobile:(0400) 833 700
-------------------------------------------------------------------------
Cat! who hast passed thy grand climacteric, / How many mice and rats
hast in thy days / Destroyed? How many tit-bits stolen? Gaze / With
those bright languid segments green, and prick / Those velvet ears --
but prithee do not stick / Thy latent talons in me, and up-raise / Thy
gentle mew, and tell me all thy frays / Of fish and mice, and rats and
tender chick. .... - Keats, from "To Mrs Reynold's Cat"
-----Original Message-----
From: wxpython-users-admin@lists.wxwindows.org
[mailto:wxpython-users-admin@lists.wxwindows.org]On Behalf Of Yumpee
Sent: Thursday, 29 March 2001 12:32 PM
To: Kevin Cole
Cc: wxpython-users@lists.wxwindows.org
Subject: [wxPython] Re: [wxpython-users] Next dense question: Why
doesn't this center?
On Wednesday, March 28, 2001 at 11:26:25 AM, Kevin Cole wrote:
> Never being one to shy away from displaying my ignorance... I was
> looking for a way to center my main window on the screen, and thought I
> -------------------------------------------------------------------
> class MyFrame(wxFrame):
> def __init__(self, parent, ID, title):
> # Figure out size of screen (so we can center the window)
> width = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_X)
> height = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_Y)
> pos = wxPoint((width-640)/2, (height-480)/2)
> size = wxSize(640, 480)
> wxFrame.__init__(self, parent, ID, title, pos, size)
> -------------------------------------------------------------------
My original code (included in the previous message below) appears to
work okay in a Windows 95 environment, but under RedHat Linux 6.2, there
seems to be some "persistance of memory" problem, if that makes any
sense: The window seems to want to open where it was last opened. I
mentioned before, that I had played around with wxCentre. I also tried,
the suggested wxCenterOnScreen, and it appears to ignore both. However
the splash screen appears to center correctly on both OS's.
which are the numbers I expect. The code just seems to ignore the
values with regards to actually positioning the window.
···
On Wed, 28 Mar 2001, Kevin Cole wrote:
I was looking for a way to center my main window on the screen, and
thought I understood how splashscreen.py was doing it. Apparently,
I've missed something yet again. I've tried a few different
variants on the following, and none seem to get it right. (I also
experimented with wxCentre, to no avail.)
-------------------------------------------------------------------
class MyFrame(wxFrame):
def __init__(self, parent, ID, title):
# Figure out size of screen (so we can center the window)
width = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_X)
height = wxSystemSettings_GetSystemMetric(wxSYS_SCREEN_Y)
pos = wxPoint((width-640)/2, (height-480)/2)
size = wxSize(640, 480)
wxFrame.__init__(self, parent, ID, title, pos, size)
-------------------------------------------------------------------
(I've only tried on my Linux box. It displays too far to the right,
even though the splash screen that I use later looks centered to me.
Haven't tried it on a Windoze box yet.)
My original code (included in the previous message below) appears to
work okay in a Windows 95 environment, but under RedHat Linux 6.2, there
seems to be some "persistance of memory" problem, if that makes any
sense: The window seems to want to open where it was last opened. I
mentioned before, that I had played around with wxCentre. I also tried,
the suggested wxCenterOnScreen, and it appears to ignore both. However
the splash screen appears to center correctly on both OS's.
which are the numbers I expect. The code just seems to ignore the
values with regards to actually positioning the window.
What window manager are you using? It is the one that actually decides
where to place the windows, wxWin can only give it hints. It may be that
for windows with normal frame styles it ignores the hints and applies some
internal policy instead, but for windows with none like the splash window
the policy doesn't get used.
···
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!
Red Hat 6.2 defaults to sawmill I think, which I also use, and I've
given up on trying to get wxPython windows to appear in any sensible
location under this window manager... I don't know why, but there's
just no reasoning with it It doesn't seem to follow the hints
you give it with wxp, but neither does it seem to follow the settings
you specify for placement in the WM config tool for wxp windows (the
default setting for placement under sawmill is called 'best fit' and
it works very well with native gtk apps in my experience, putting
them into what seems like the best empty bit of screen whenever
possible)
*shrug*
This problem persists through all versions of sawmill/sawfish that I
have used in the last year by the way...
Regards,
Denny
···
On Thu, 29 Mar 2001, Robin Dunn wrote:
> My original code (included in the previous message below) appears to
> work okay in a Windows 95 environment, but under RedHat Linux 6.2, there
> seems to be some "persistance of memory" problem, if that makes any
> sense: The window seems to want to open where it was last opened.
What window manager are you using? It is the one that actually decides
where to place the windows, wxWin can only give it hints. It may be that
for windows with normal frame styles it ignores the hints and applies some
internal policy instead, but for windows with none like the splash window
the policy doesn't get used.
----------------------------------------------------------
Denny De La Haye \ www-edc.eng.cam.ac.uk/~djd33
Engineering Design Centre, \ www-edc.eng.cam.ac.uk
Department of Engineering, \ www.eng.cam.ac.uk
University of Cambridge, UK \ www.cam.ac.uk
----------------------------------------------------------
"Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former." (Albert Einstein)
Ahhh, now I have an answer that makes some sense. I'm using Sawmill
too. Thanks all. (I can live with windows not being exactly where I
want them, but not understanding what was wrong was frustrating.)
···
On Fri, 30 Mar 2001, Denny De La Haye wrote:
On Thu, 29 Mar 2001, Robin Dunn wrote:
> > My original code (included in the previous message below) appears to
> > work okay in a Windows 95 environment, but under RedHat Linux 6.2, there
> > seems to be some "persistance of memory" problem, if that makes any
> > sense: The window seems to want to open where it was last opened.
>
> What window manager are you using? It is the one that actually decides
> where to place the windows, wxWin can only give it hints. It may be that
> for windows with normal frame styles it ignores the hints and applies some
> internal policy instead, but for windows with none like the splash window
> the policy doesn't get used.
Red Hat 6.2 defaults to sawmill I think, which I also use, and I've
given up on trying to get wxPython windows to appear in any sensible
location under this window manager... I don't know why, but there's
just no reasoning with it It doesn't seem to follow the hints
you give it with wxp, but neither does it seem to follow the settings
you specify for placement in the WM config tool for wxp windows (the
default setting for placement under sawmill is called 'best fit' and
it works very well with native gtk apps in my experience, putting
them into what seems like the best empty bit of screen whenever
possible)
*shrug*
This problem persists through all versions of sawmill/sawfish that I
have used in the last year by the way...
Regards,
Denny
----------------------------------------------------------
Denny De La Haye \ www-edc.eng.cam.ac.uk/~djd33
Engineering Design Centre, \ www-edc.eng.cam.ac.uk
Department of Engineering, \ www.eng.cam.ac.uk
University of Cambridge, UK \ www.cam.ac.uk
----------------------------------------------------------
"Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former." (Albert Einstein)
--
Kevin Cole, RHCE, Linux Admin | E-mail: kjcole@gri.gallaudet.edu
Gallaudet Research Institute | WWW: http://gri.gallaudet.edu/~kjcole/
Hall Memorial Bldg S-419 | Voice: (202) 651-5135
Washington, D.C. 20002-3695 | FAX: (202) 651-5746
I've just re-read your original mail more carefully and it sounds like
you may actually have a sawmill option turned on that you would rather
not have... try this:
Settings -> Sawmill Window Manager -> Placement
See if you have the "Automatically remember window positions" box ticked.
If so, try unticking it and see if that helps.
Regards,
Denny
···
On Sat, 31 Mar 2001, Kevin Cole wrote:
Ahhh, now I have an answer that makes some sense. I'm using Sawmill
too. Thanks all. (I can live with windows not being exactly where I
want them, but not understanding what was wrong was frustrating.)
> > > My original code (included in the previous message below) appears to
> > > work okay in a Windows 95 environment, but under RedHat Linux 6.2, there
> > > seems to be some "persistance of memory" problem, if that makes any
> > > sense: The window seems to want to open where it was last opened.
----------------------------------------------------------
Denny De La Haye \ www-edc.eng.cam.ac.uk/~djd33
Engineering Design Centre, \ www-edc.eng.cam.ac.uk
Department of Engineering, \ www.eng.cam.ac.uk
University of Cambridge, UK \ www.cam.ac.uk
----------------------------------------------------------
"Only two things are infinite, the universe and human stupidity,
and I'm not sure about the former." (Albert Einstein)