Hi all,
For a custom widget i would like add my own style flags in the control init 'style' keyword.
To avoid conflics with wx styles i search the docs for a wx.USER_STYLE but i don't find it.
I would like to do:
#definicion
MY_STYLE01 = wx.USER_STYLE
MY_STYLE02 = wx.USER_STYLE * 0x02
MY_STYLE02 = wx.USER_STYLE * 0x04
etc ...
# then on control creation
mctrl = myCustomCtrl(self, -1, "", style = wx.SIMPLE_BORDER | MY_STYLE01 | MY_STYLE02)
Exist the wx.USER_STYLE or may i add a new parameter in init?
Thanks.
···
--
*****************************************
Oswaldo Hernández
oswaldo@soft-com.es
*****************************************
why not add a new parameter… like in
mctrl = myCustomCtrl(self, -1, “”, style = wx.SIMPLE_BORDER, extrastyle= MY_STYLE01 | MY_STYLE02)
Peter
···
On 6/10/06, Oswaldo Hernández listas@soft-com.es wrote:
Hi all,
For a custom widget i would like add my own style flags in the control init ‘style’ keyword.
To avoid conflics with wx styles i search the docs for a wx.USER_STYLE but i don’t find it.
I would like to do:
#definicion
MY_STYLE01 = wx.USER_STYLE
MY_STYLE02 = wx.USER_STYLE * 0x02
MY_STYLE02 = wx.USER_STYLE * 0x04
etc …
then on control creation
mctrl = myCustomCtrl(self, -1, “”, style = wx.SIMPLE_BORDER | MY_STYLE01 | MY_STYLE02)
Exist the wx.USER_STYLE or may i add a new parameter in init?
Thanks.
Robin
June 11, 2006, 2:26am
3
Oswaldo Hernández wrote:
Hi all,
For a custom widget i would like add my own style flags in the control init 'style' keyword.
To avoid conflics with wx styles i search the docs for a wx.USER_STYLE but i don't find it.
I would like to do:
#definicion
MY_STYLE01 = wx.USER_STYLE
MY_STYLE02 = wx.USER_STYLE * 0x02
MY_STYLE02 = wx.USER_STYLE * 0x04
etc ...
The 32 bits of the style flag are divided in half. The first half are for styles common across all windows, like border styles, and the second half (the lower 16 bits of the value) are for styles specific to each window type. So you should be able to safely use values 0x0001 through 0x8000 for your custom control's styles.
···
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!