How to set size to CheckBox

Hi, I was new to wxPython , I use wxPython2.8.12.0 and python2.7.1

I use a CheckBox , and I set it’s size

self.is_backup = wx.CheckBox(self.panel_up, label=u’backup’, size=(150, 50), style=wx.SHAPED)

but it seems not work , The check area seems to be (150,50)

but the checkbox is also the defaut size

how can I set size to CheckBox and let it looks big?

Thanks

···


Thanks & Regards,
ezioruan = {
‘email’:‘qiaoqinqie2@gamil.com’,
‘interests’:{ ‘Python’, ‘Linux’ ‘game’},

    'location':'南京',
    'website':'[http://ezioandnanjing.appspot.com/](http://ezioandnanjing.appspot.com/)',
    'note':'功名利禄身外物,知足常乐总逍遥'

    }

阮明辉 wrote:

Hi, I was new to wxPython , I use wxPython2.8.12.0 and python2.7.1
I use a CheckBox , and I set it's size

self.is_backup = wx.CheckBox(self.panel_up, label=u'backup',
size=(150, 50), style=wx.SHAPED)

but it seems not work , The check area seems to be (150,50)
but the checkbox is also the defaut size

how can I set size to CheckBox and let it looks big?

If you need that, you will have to do all of the drawing by hand. The
operating system always uses a fixed size for the checkboxes. There are
pure Python versions of many of the standard controls, but I'm not sure
there is a checkbox.

If you are on Windows, the check box glyphs are made up of characters
from the Marlett font, as are all of the window decorations. You can
draw characters from that font in whatever font size you want.

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

The box in the native checkbox widget is drawn by the native APIs and we have no control over the size, shape or style of the box. If you really need this then you can create a custom checkbox widget where you draw the box however you want it, but you'll also have to do things like handling key and mouse events, sending checkbox events, etc.

···

On 6/14/11 8:13 PM, 阮明辉 wrote:

Hi, I was new to wxPython , I use wxPython2.8.12.0 and python2.7.1
I use a CheckBox , and I set it's size

self.is_backup = wx.CheckBox(self.panel_up, label=u'backup', size=(150,
50), style=wx.SHAPED)

but it seems not work , The check area seems to be (150,50)
but the checkbox is also the defaut size

how can I set size to CheckBox and let it looks big?

--
Robin Dunn
Software Craftsman

Seems like it wouldn't be hard to make a TextCtrl do what you want. Sort of like the attached, with some more logic and whatnot.

checkbox.py (1.56 KB)

···

On 06/15/2011 11:23 AM, Robin Dunn wrote:

On 6/14/11 8:13 PM, 阮明辉 wrote:

Hi, I was new to wxPython , I use wxPython2.8.12.0 and python2.7.1
I use a CheckBox , and I set it's size

self.is_backup = wx.CheckBox(self.panel_up, label=u'backup', size=(150,
50), style=wx.SHAPED)

but it seems not work , The check area seems to be (150,50)
but the checkbox is also the defaut size

how can I set size to CheckBox and let it looks big?

The box in the native checkbox widget is drawn by the native APIs and we have no control over the size, shape or style of the box. If you really need this then you can create a custom checkbox widget where you draw the box however you want it, but you'll also have to do things like handling key and mouse events, sending checkbox events, etc.