Help Contents / GUI programming / Windows A-F

Windows A-F
...are areas on the screen, which act as the base class for Frames, Graphs and any other Controls. You can use all functions,  that take a Window as argument, with other window classes like Frames, Graphs and Controls. The Window functions closely match the underlying wxWindow functions. 

Window Styles 

The following styles can apply to all windows, although they will not always make sense for a particular window class or on all platforms. 

wxSIMPLE_BORDER  Displays a thin border around the window. wxBORDER is the old name for this style. 

wxDOUBLE_BORDER  Displays a double border. Windows and Mac only. 

wxSUNKEN_BORDER  Displays a sunken border. 

wxRAISED_BORDER  Displays a raised border. 

wxSTATIC_BORDER  Displays a border suitable for a static control. Windows only. 

wxNO_BORDER  Displays no border, overriding the default border style for the window. 

wxTRANSPARENT_WINDOW  The window is transparent, that is, it will not receive paint events. Windows only. 

wxTAB_TRAVERSAL  Use this to enable tab traversal for non-dialog windows. 

wxWANTS_CHARS  Use this to indicate that the window wants to get all char/key events for all keys - even for keys like TAB or ENTER which are usually used for dialog navigation and which wouldn't be generated without this style. If you need to use this style in order to get the arrows or etc., but would still like to have normal keyboard navigation take place, you should create and send a wxNavigationKeyEvent in response to the key events for Tab and Shift-Tab. 

wxNO_FULL_REPAINT_ON_RESIZE  Disables repainting the window completely when its size is changed - you will have to repaint the new window area manually if you use this style. Currently only has an effect for Windows. 

wxVSCROLL  Use this style to enable a vertical scrollbar. 

wxHSCROLL  Use this style to enable a horizontal scrollbar. 

wxALWAYS_SHOW_SB  If a window has scrollbars, disable them instead of hiding them when they are not needed (i.e. when the size of the window is big enough to not require the scrollbars to navigate it). This style is currently only implemented for wxMSW and wxUniversal and does nothing on the other platforms. 

wxCLIP_CHILDREN  Use this style to eliminate flicker caused by the background being repainted, then children being painted over them. Windows only. 

wxFULL_REPAINT_ON_RESIZE  Use this style to force a complete redraw of the window whenever it is resized instead of redrawing just the part of the window affected by resizing. Note that this was the behaviour by default before 2.5.1 release and that if you experience redraw problems with the code which previously used to work you may want to try this. 



Extra window styles 

The following are extra styles, set using wxWindow::SetExtraStyle. 

wxWS_EX_VALIDATE_RECURSIVELY  By default, Validate/TransferDataTo/FromWindow() only work on direct children of the window (compatible behaviour). Set this flag to make them recursively descend into all subwindows.   

wxWS_EX_BLOCK_EVENTS  wxCommandEvents and the objects of the derived classes are forwarded to the parent window and so on recursively by default. Using this flag for the given window allows to block this propagation at this window, i.e. prevent the events from being propagated further upwards. Dialogs have this flag on by default.   

wxWS_EX_TRANSIENT  Don't use this window as an implicit parent for the other windows: this must be used with transient windows as otherwise there is the risk of creating a dialog/frame with this window as a parent which would lead to a crash if the parent is destroyed before the child.   

wxWS_EX_PROCESS_IDLE  This window should always process idle events, even if the mode set by wxIdleEvent::SetMode is wxIDLE_PROCESS_SPECIFIED.   

wxWS_EX_PROCESS_UI_UPDATES  This window should always process UI update events, even if the mode set by wxUpdateUIEvent::SetMode is wxUPDATE_UI_PROCESS_SPECIFIED.   

(Window parent)This section contains the following sub-sections:
	Window
	WindowCenter
	WindowCenterOnParent
	WindowClearBackground
	WindowClientToScreen
	WindowClose
	WindowDestroy
	DestroyChildren
	WindowDisable
	WindowEnable
	WindowFindFocus
	WindowFindWindowById
	WindowFindWindowByLabel
	WindowFindWindowByName
	WindowFit
	WindowFitInside
	WindowFreeze

previous: Standard Dialogs	next: WindowGet
