Hello. wxPython is a fantastic GUI toolkit (though sadly there are some D&D tools, but that’s another story), but I have one problem.
On OS X 10.8 and 10.9 (and possibly older versions too) wxPython buttons, when passed a size argument, do not scale to the size provided. So for example if I did button = wx.Button(panel, wx.ID_ANY, “Hello World!”, size=(50, 70), pos=(10, 10)), it would not apply the size to be 50x70. I’m not sure if this is just me or if it’s a problem with wx, but it’s frustrating me. wxPython 2.9 does not fix this issue either.
Now there is a very VERY good chance that this is just my Mac, because apparently my Mac has issues that no other Mac has. One example is OpenSSL not working. Another would be GCC 4.0 not being installed and not installing, and Homebrew not installing. I’m planning a fresh install in December as I am upgrading to an SSD. Yes, I’ve asked online about the other issues, and no one else has them. They ignore me and sometimes ban me for telling lies/trolling because this is impossible (StackExchange, I’m looking at you). I made another account on StackExchange and asked the question again, and it’s been up there for a few months with no reply
So if this just my computer, should I just wait until the fresh install and see if that fixes it? If it doesn’t, what then?
Thanks!
On OS X 10.8 and 10.9 (and possibly older versions too) wxPython buttons,
when passed a size argument, do not scale to the size provided. So for
example if I did button = wx.Button(panel, wx.ID_ANY, "Hello World!",
size=(50, 70), pos=(10, 10)), it would not apply the size to be 50x70.
I'm not sure if this is just me or if it's a problem with wx, but
it's frustrating me. wxPython 2.9 does not fix this issue either.
I think it's a Mac UI issue -- i.e .Apple thinks all buttons should be the
same. I find I can set the width, but not the height -- the height is
always the same. Though setting the height does change the "apparent size
as far as layout is concerned", but it's draw the same height regardless/
You can use a "generic" button, but it'll take some work to amke it look
Mac-native:
http://www.wxpython.org/docs/api/wx.lib.buttons-module.html
See the enclosed example.
JustButton.py (1 KB)
···
On Tue, Nov 5, 2013 at 12:54 PM, Eamonn Rea <eamonnrea@gmail.com> wrote:
Now there is a very *VERY* good chance that this is just my Mac, because
apparently my Mac has issues that no other Mac has. One example is OpenSSL
not working. Another would be GCC 4.0 not being installed and not
installing, and Homebrew not installing. I'm planning a fresh install in
December as I am upgrading to an SSD. Yes, I've asked online about the
other issues, and no one else has them. They ignore me and sometimes ban me
for telling lies/trolling because this is impossible (StackExchange, I'm
looking at you). I made another account on StackExchange and asked the
question again, and it's been up there for a few months with no reply
So
if this just my computer, should I just wait until the fresh install and
see if that fixes it? If it doesn't, what then?
Thanks!
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov
I noticed this change, or somethign very similar, from a beta version of
wxPython 2.9.5.0 to the release version. That makes me think it's a change
in wx rather than OS X.
David
···
On Thu, Nov 7, 2013 at 4:25 PM, Chris Barker <chris.barker@noaa.gov> wrote:
On Tue, Nov 5, 2013 at 12:54 PM, Eamonn Rea <eamonnrea@gmail.com> wrote:
On OS X 10.8 and 10.9 (and possibly older versions too) wxPython buttons,
when passed a size argument, do not scale to the size provided. So for
example if I did button = wx.Button(panel, wx.ID_ANY, "Hello World!",
size=(50, 70), pos=(10, 10)), it would not apply the size to be 50x70.
I'm not sure if this is just me or if it's a problem with wx, but
it's frustrating me. wxPython 2.9 does not fix this issue either.
I think it's a Mac UI issue -- i.e .Apple thinks all buttons should be the
same. I find I can set the width, but not the height -- the height is
always the same. Though setting the height does change the "apparent size
as far as layout is concerned", but it's draw the same height regardless/
I also ran into this issue when trying to increase the button size to work better for touch screens (see Redirecting to Google Groups).
Chris’s suggestion is a good workaround, but the generic buttons look a bit plain.
Can anyone suggest some styling that can make the generic buttons look more mac-like?
···
On Friday, November 8, 2013 3:48:23 PM UTC-5, David Woods wrote:
On Thu, Nov 7, 2013 at 4:25 PM, Chris Barker chris....@noaa.gov wrote:
On Tue, Nov 5, 2013 at 12:54 PM, Eamonn Rea eamo...@gmail.com wrote:
On OS X 10.8 and 10.9 (and possibly older versions too) wxPython buttons, when passed a size argument, do not scale to the size provided. So for example if I did button = wx.Button(panel, wx.ID_ANY, “Hello World!”, size=(50, 70), pos=(10, 10)), it would not apply the size to be 50x70. I’m not sure if this is just me or if it’s a problem with wx, but it’s frustrating me. wxPython 2.9 does not fix this issue either.
I think it’s a Mac UI issue – i.e .Apple thinks all buttons should be the same. I find I can set the width, but not the height – the height is always the same. Though setting the height does change the “apparent size as far as layout is concerned”, but it’s draw the same height regardless/
I noticed this change, or somethign very similar, from a beta version of wxPython 2.9.5.0 to the release version. That makes me think it’s a change in wx rather than OS X.
David
Can anyone suggest some styling that can make the generic buttons look
more mac-like?
You did a great job drawing the buttons on your virtual keyboard, I'll bet
you could get something nice put together. 
(note: I'd probably draw to an off-screen bitmap and cache that...)
-Chris
···
On Fri, Nov 15, 2013 at 4:35 AM, Edward Sitarski <edward.sitarski@gmail.com>wrote:
On Friday, November 8, 2013 3:48:23 PM UTC-5, David Woods wrote:
On Thu, Nov 7, 2013 at 4:25 PM, Chris Barker <chris....@noaa.gov> wrote:
On Tue, Nov 5, 2013 at 12:54 PM, Eamonn Rea <eamo...@gmail.com> wrote:
On OS X 10.8 and 10.9 (and possibly older versions too) wxPython
buttons, when passed a size argument, do not scale to the size provided. So
for example if I did button = wx.Button(panel, wx.ID_ANY, "Hello
World!", size=(50, 70), pos=(10, 10)), it would not apply the size to
be 50x70. I'm not sure if this is just me or if it's a problem with wx, but
it's frustrating me. wxPython 2.9 does not fix this issue either.
I think it's a Mac UI issue -- i.e .Apple thinks all buttons should be
the same. I find I can set the width, but not the height -- the height is
always the same. Though setting the height does change the "apparent size
as far as layout is concerned", but it's draw the same height regardless/
I noticed this change, or somethign very similar, from a beta version of
wxPython 2.9.5.0 to the release version. That makes me think it's a change
in wx rather than OS X.
David
--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
Christopher Barker, PhD
Python Language Consulting
- Teaching
- Scientific Software Development
- Desktop GUI and Web Development
- wxPython, numpy, scipy, Cython