- c->right.SameAs (panel, wxRight, 2);
- c->width.AsIs();
- c->height.AsIs();
- m_editButton->SetConstraints(c);
- }
-
- m_valueText = new wxPropertyTextEdit(this, panel, wxID_PROP_TEXT, "", wxPoint(-1, -1), wxSize(-1, -1), wxPROCESS_ENTER);
- m_valueText->Enable(FALSE);
-
- wxLayoutConstraints *c = new wxLayoutConstraints;
-
- if (m_cancelButton)
- c->left.RightOf (m_confirmButton, 2);
- else
- c->left.SameAs (panel, wxLeft, 2);
-/*
- if (m_windowCloseButton)
- c->top.Below (m_windowCloseButton, 2);
- else
-*/
- c->top.SameAs (panel, wxTop, 2);
-
- if (m_editButton)
- c->right.LeftOf (m_editButton, 2);
- else
- c->right.SameAs (panel, wxRight, 2);
- c->height.AsIs();
-
- m_valueText->SetConstraints(c);
-
- m_valueList = new wxListBox(panel, wxID_PROP_VALUE_SELECT, wxPoint(-1, -1), wxSize(-1, 60));
- m_valueList->Show(FALSE);
-
- c = new wxLayoutConstraints;
-
- c->left.SameAs (panel, wxLeft, 2);
- c->top.Below (m_valueText, 2);
- c->right.SameAs (panel, wxRight, 2);
- c->height.Absolute(60);
-
- m_valueList->SetConstraints(c);
-
- m_propertyScrollingList = new wxListBox(panel, wxID_PROP_SELECT,
- wxPoint(-1, -1), wxSize(300, 300));
- m_propertyScrollingList->SetFont(* boringFont);
-
- c = new wxLayoutConstraints;
-
- c->left.SameAs (panel, wxLeft, 2);
-
- if (m_buttonFlags & wxPROP_DYNAMIC_VALUE_FIELD)
- c->top.Below (m_valueText, 2);
- else
- c->top.Below (m_valueList, 2);
-
- c->right.SameAs (panel, wxRight, 2);
-
- if (m_windowCloseButton)
- c->bottom.Above (m_windowCloseButton, -2);
- else
- c->bottom.SameAs (panel, wxBottom, 2);
-
- m_propertyScrollingList->SetConstraints(c);
+ if ((m_buttonFlags & wxPROP_BUTTON_OK) ||
+ (m_buttonFlags & wxPROP_BUTTON_CLOSE) ||
+ (m_buttonFlags & wxPROP_BUTTON_CANCEL) ||
+ (m_buttonFlags & wxPROP_BUTTON_HELP))
+ {
+ wxBoxSizer *bottomsizer = new wxBoxSizer( wxHORIZONTAL );
+ buttonborder = 5;
+
+ if (m_buttonFlags & wxPROP_BUTTON_OK)
+ {
+ m_windowCloseButton = new wxButton(panel, wxID_OK, _("OK"), wxPoint(-1, -1), largeButtonSize );
+ m_windowCloseButton->SetDefault();
+ m_windowCloseButton->SetFocus();
+ bottomsizer->Add( m_windowCloseButton, 0, wxLEFT|wxTOP|wxBOTTOM, buttonborder );
+ }
+ else if (m_buttonFlags & wxPROP_BUTTON_CLOSE)
+ {
+ m_windowCloseButton = new wxButton(panel, wxID_OK, _("Close"), wxPoint(-1, -1), largeButtonSize );
+ bottomsizer->Add( m_windowCloseButton, 0, wxALL, buttonborder );
+ }
+ if (m_buttonFlags & wxPROP_BUTTON_CANCEL)
+ {
+ m_windowCancelButton = new wxButton(panel, wxID_CANCEL, _("Cancel"), wxPoint(-1, -1), largeButtonSize );
+ bottomsizer->Add( m_windowCancelButton, 0, wxALL, buttonborder );
+ }
+ if (m_buttonFlags & wxPROP_BUTTON_HELP)
+ {
+ m_windowHelpButton = new wxButton(panel, wxID_HELP, _("Help"), wxPoint(-1, -1), largeButtonSize );
+ bottomsizer->Add( m_windowHelpButton, 0, wxALL, buttonborder );
+ }
+
+ mainsizer->Add( bottomsizer, 1, wxALIGN_RIGHT | wxEXPAND );
+ }