1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
|
<HTML>
<head><title>wxPanel</title></head>
<BODY BGCOLOR=#FFFFFF>
<A NAME="wxpanel"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx165.htm#wxpalette"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx167.htm#wxpaneltabview"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>
<H2>wxPanel</H2>
<P>
A panel is a window on which controls are placed. It is usually placed within a frame.
It contains minimal extra functionality over and above its parent class wxWindow; its main
purpose is to be similar in appearance and functionality to a dialog, but with the flexibility of
having any window as a parent.<P>
<I>Note:</I> if not all characters are being intercepted by your OnKeyDown or OnChar handler,
it may be because you are using the wxTAB_TRAVERSAL style, which grabs some keypresses for use
by child controls.<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
<A HREF="wx260.htm#wxwindow">wxWindow</A><BR>
<A HREF="wx85.htm#wxevthandler">wxEvtHandler</A><BR>
<A HREF="wx158.htm#wxobject">wxObject</A><P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
<wx/panel.h><P>
<B><FONT COLOR="#FF0000">Window styles</FONT></B><P>
There are no specific styles for this window.<P>
See also <A HREF="wx305.htm#windowstyles">window styles overview</A>.<P>
<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
By default, a panel has the same colouring as a dialog.<P>
A panel may be loaded from a wxWindows resource file (extension <TT>wxr</TT>).<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx71.htm#wxdialog">wxDialog</A><P>
<B><FONT COLOR="#FF0000">Members</FONT></B><P>
<A HREF="#wxpanelconstr">wxPanel::wxPanel</A><BR>
<A HREF="#topic635">wxPanel::~wxPanel</A><BR>
<A HREF="#wxpanelcreate">wxPanel::Create</A><BR>
<A HREF="#wxpanelinitdialog">wxPanel::InitDialog</A><BR>
<A HREF="#wxpanelonsyscolourchanged">wxPanel::OnSysColourChanged</A><BR>
<P>
<HR>
<A NAME="wxpanelconstr"></A>
<H3>wxPanel::wxPanel</H3>
<P>
<B></B> <B>wxPanel</B>()<P>
Default constructor.<P>
<B></B> <B>wxPanel</B>(<B>wxWindow* </B><I>parent</I>, <B>wxWindowID </B><I>id</I>,
<B>const wxPoint& </B><I>pos = wxDefaultPosition</I>,
<B>const wxSize& </B><I>size = wxDefaultSize</I>,
<B>long</B><I> style = wxTAB_TRAVERSAL</I>,
<B>const wxString& </B><I>name = "panel"</I>)<P>
Constructor.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>parent</I><UL><UL>
The parent window.</UL></UL>
<P>
<I>id</I><UL><UL>
An identifier for the panel. A value of -1 is taken to mean a default.</UL></UL>
<P>
<I>pos</I><UL><UL>
The panel position. A value of (-1, -1) indicates a default position, chosen by
either the windowing system or wxWindows, depending on platform.</UL></UL>
<P>
<I>size</I><UL><UL>
The panel size. A value of (-1, -1) indicates a default size, chosen by
either the windowing system or wxWindows, depending on platform.</UL></UL>
<P>
<I>style</I><UL><UL>
The window style. See <A HREF="wx166.htm#wxpanel">wxPanel</A>.</UL></UL>
<P>
<I>name</I><UL><UL>
Used to associate a name with the window,
allowing the application user to set Motif resource values for
individual dialog boxes.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx166.htm#wxpanelcreate">wxPanel::Create</A><P>
<HR>
<A NAME="topic635"></A>
<H3>wxPanel::~wxPanel</H3>
<P>
<B></B> <B>~wxPanel</B>()<P>
Destructor. Deletes any child windows before deleting the physical window.<P>
<HR>
<A NAME="wxpanelcreate"></A>
<H3>wxPanel::Create</H3>
<P>
<B>bool</B> <B>Create</B>(<B>wxWindow* </B><I>parent</I>, <B>wxWindowID </B><I>id</I>,
<B>const wxPoint& </B><I>pos = wxDefaultPosition</I>,
<B>const wxSize& </B><I>size = wxDefaultSize</I>,
<B>long</B><I> style = wxTAB_TRAVERSAL</I>,
<B>const wxString& </B><I>name = "panel"</I>)<P>
Used for two-step panel construction. See <A HREF="wx166.htm#wxpanelconstr">wxPanel::wxPanel</A>
for details.<P>
<HR>
<A NAME="wxpanelinitdialog"></A>
<H3>wxPanel::InitDialog</H3>
<P>
<B>void</B> <B>InitDialog</B>()<P>
Sends an <A HREF="wx260.htm#wxwindowoninitdialog">wxWindow::OnInitDialog</A> event, which
in turn transfers data to the dialog via validators.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx260.htm#wxwindowoninitdialog">wxWindow::OnInitDialog</A><P>
<HR>
<A NAME="wxpanelonsyscolourchanged"></A>
<H3>wxPanel::OnSysColourChanged</H3>
<P>
<B>void</B> <B>OnSysColourChanged</B>(<B>wxSysColourChangedEvent& </B><I>event</I>)<P>
The default handler for wxEVT_SYS_COLOUR_CHANGED.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>event</I><UL><UL>
The colour change event.</UL></UL>
<P>
<B><FONT COLOR="#FF0000">Remarks</FONT></B><P>
Changes the panel's colour to conform to the current settings (Windows only).
Add an event table entry for your panel class if you wish the behaviour
to be different (such as keeping a user-defined
background colour). If you do override this function, call <A HREF="wx260.htm#wxwindowonsyscolourchanged">wxWindow::OnSysColourChanged</A> to
propagate the notification to child windows and controls.<P>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx227.htm#wxsyscolourchangedevent">wxSysColourChangedEvent</A><P>
</BODY></HTML>
|