]> git.saurik.com Git - wxWidgets.git/blame - src/gtk1/statbox.cpp
Added support for frames without borders (such as for
[wxWidgets.git] / src / gtk1 / statbox.cpp
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: statbox.cpp
3// Purpose:
4// Author: Robert Roebling
5// Created: 01/02/97
6// Id:
7// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
904f68c7 8// Licence: wxWindows licence
c801d85f
KB
9/////////////////////////////////////////////////////////////////////////////
10
11#ifdef __GNUG__
12#pragma implementation "statbox.h"
13#endif
14
15#include "wx/statbox.h"
16
17//-----------------------------------------------------------------------------
18// wxStaticBox
19//-----------------------------------------------------------------------------
20
21IMPLEMENT_DYNAMIC_CLASS(wxStaticBox,wxControl)
22
23wxStaticBox::wxStaticBox(void)
24{
3f659fd6 25}
c801d85f 26
904f68c7
VZ
27wxStaticBox::wxStaticBox( wxWindow *parent, wxWindowID id, const wxString &label,
28 const wxPoint &pos, const wxSize &size,
debe6624 29 long style, const wxString &name )
c801d85f
KB
30{
31 Create( parent, id, label, pos, size, style, name );
3f659fd6 32}
c801d85f 33
904f68c7
VZ
34bool wxStaticBox::Create( wxWindow *parent, wxWindowID id, const wxString &label,
35 const wxPoint &pos, const wxSize &size,
debe6624 36 long style, const wxString &name )
c801d85f
KB
37{
38 m_needParent = TRUE;
904f68c7 39
c801d85f
KB
40 PreCreation( parent, id, pos, size, style, name );
41
904f68c7
VZ
42 m_widget = gtk_frame_new(m_label);
43
c801d85f 44 PostCreation();
904f68c7 45
b4071e91
RR
46 SetLabel(label);
47
c801d85f 48 Show( TRUE );
904f68c7 49
c801d85f 50 return TRUE;
3f659fd6 51}
d3904ceb
RR
52
53void wxStaticBox::SetLabel( const wxString &label )
54{
55 wxControl::SetLabel( label );
56 GtkFrame *frame = GTK_FRAME( m_widget );
57 gtk_frame_set_label( frame, GetLabel() );
58}