works perfect i used wxDEFAULT_FRAME_STYLE & ~ (wxRESIZE_BRDER |
wxRESIZE_BX | wxMAXIMIZE_BX) thats exactly what i was looking for
thanks
justin
8/11/06, Brian Smith <smithbk (AT) aecl (DOT) cawrote:
Rich Shepard writes:
Thu, 10 Hug 2006, Christopher Barker wrote:
wxDEFAULT_FRAME_STYLE & ~ (wxRESIZE_BRDER | wxRESIZE_BX |
wxMAXIMIZE_BX)
Hm-m-m. How interesting. page 45 of Rappin & Dunn we read, "To
remove
individual style bits from a composed style, you use the bitwise
exclusive
or (XR) operator, ^." They then provide the example of:
wx.DEFAULT_FRAME_STYLE ^ (wx.RESIZE_BRDER | wx. MINIMIZE_BX |
wx.MAXIMIZE_BX)
The envelope, please.
The method Chris quoted is the one I've always used for turning off
bits. I
wouldn't trust the XR method because it only works if you know for sure
what
bits are currently set in the initial value. If someone decides to change
that value then you'll actually start turning bits on, not off.
Example:
INITIAL_VALUE = 0xffff
UNWANTED_BIT = 0x0001
print hex(INITIAL_VALUE & ~ UNWANTED_BIT)
0xfffe
print hex(INITIAL_VALUE ^ UNWANTED_BIT)
0xfffe
INITIAL_VALUE = 0xfffe # Some evil person has changed our initial
value!
print hex(INITIAL_VALUE & ~ UNWANTED_BIT)
0xfffe
print hex(INITIAL_VALUE ^ UNWANTED_BIT)
0xffff
Brian
>
>
>
To unsubscribe, e-mail: wxPython-users-unsubscribe (AT) lists (DOT) wxwidgets.org
For additional commands, e-mail: wxPython-users-help (AT) lists (DOT) wxwidgets.org
--