#include "wx/arrstr.h"
#endif
-#if wxUSE_STATLINE
- #include "wx/statline.h"
-#endif
-
+#include "wx/statline.h"
#include "wx/generic/choicdgg.h"
// ----------------------------------------------------------------------------
const wxPoint& pos,
long styleLbox)
{
-#if defined(__SMARTPHONE__) || defined(__POCKETPC__)
- styleDlg &= ~wxBORDER_MASK;
- styleDlg &= ~wxRESIZE_BORDER;
- styleDlg &= ~wxCAPTION;
-#endif
#ifdef __WXMAC__
if ( !wxDialog::Create(parent, wxID_ANY, caption, pos, wxDefaultSize, styleDlg & (~wxCANCEL) ) )
return false;
topsizer->Add( m_listbox, 1, wxEXPAND|wxLEFT|wxRIGHT, wxLARGESMALL(15,0) );
- // smart phones does not support or do not waste space for wxButtons
-#ifdef __SMARTPHONE__
-
- SetRightMenu(wxID_CANCEL, _("Cancel"));
-
-#else // __SMARTPHONE__/!__SMARTPHONE__
-
- // Mac Human Interface Guidelines recommend not to use static lines as grouping elements
-#ifndef __WXMAC__
-#if wxUSE_STATLINE
- // 3) static line
- topsizer->Add( new wxStaticLine( this, wxID_ANY ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 );
-#endif
-#endif
-
- // 4) buttons
- topsizer->Add( CreateButtonSizer( styleDlg & (wxOK|wxCANCEL) ), 0, wxEXPAND | wxALL, 10 );
-
-#endif // !__SMARTPHONE__
+ // 3) buttons if any
+ wxSizer *buttonSizer = CreateButtonSizer( styleDlg & ButtonSizerFlags , true, wxLARGESMALL(10,0) );
+ if(buttonSizer->GetChildren().GetCount() > 0 )
+ {
+ topsizer->Add( buttonSizer, 0, wxEXPAND | wxALL, wxLARGESMALL(10,0) );
+ }
+ else
+ {
+ topsizer->AddSpacer( wxLARGESMALL(15,0) );
+ delete buttonSizer;
+ }
SetSizer( topsizer );
-#if !defined(__SMARTPHONE__) && !defined(__POCKETPC__)
topsizer->SetSizeHints( this );
topsizer->Fit( this );
if ( styleDlg & wxCENTRE )
Centre(wxBOTH);
-#endif
m_listbox->SetFocus();