Choices dialog adjustement to SmartPhone.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -251,6 +251,25 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
|
|||||||
|
|
||||||
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
|
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
#ifdef __SMARTPHONE__
|
||||||
|
|
||||||
|
// 1) text message
|
||||||
|
topsizer->Add( CreateTextSizer( message ), 0, wxEXPAND, 0 );
|
||||||
|
|
||||||
|
// 2) list box
|
||||||
|
m_listbox = new wxListBox( this, wxID_LISTBOX,
|
||||||
|
wxDefaultPosition, wxDefaultSize,
|
||||||
|
n, choices,
|
||||||
|
styleLbox );
|
||||||
|
if ( n > 0 )
|
||||||
|
m_listbox->SetSelection(0);
|
||||||
|
|
||||||
|
topsizer->Add( m_listbox, 1, wxEXPAND, 0 );
|
||||||
|
|
||||||
|
SetRightMenu(wxID_CANCEL, _("Cancel"));
|
||||||
|
|
||||||
|
#else // __SMARTPHONE__/!__SMARTPHONE__
|
||||||
|
|
||||||
// 1) text message
|
// 1) text message
|
||||||
topsizer->Add( CreateTextSizer( message ), 0, wxALL, 10 );
|
topsizer->Add( CreateTextSizer( message ), 0, wxALL, 10 );
|
||||||
|
|
||||||
@@ -272,6 +291,8 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
|
|||||||
// 4) buttons
|
// 4) buttons
|
||||||
topsizer->Add( CreateButtonSizer( styleDlg & (wxOK|wxCANCEL) ), 0, wxCENTRE | wxALL, 10 );
|
topsizer->Add( CreateButtonSizer( styleDlg & (wxOK|wxCANCEL) ), 0, wxCENTRE | wxALL, 10 );
|
||||||
|
|
||||||
|
#endif // !__SMARTPHONE__
|
||||||
|
|
||||||
SetAutoLayout( true );
|
SetAutoLayout( true );
|
||||||
SetSizer( topsizer );
|
SetSizer( topsizer );
|
||||||
|
|
||||||
@@ -303,7 +324,11 @@ bool wxAnyChoiceDialog::Create(wxWindow *parent,
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog)
|
BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog)
|
||||||
|
#if defined(__SMARTPHONE__)
|
||||||
|
EVT_MENU(wxID_OK, wxSingleChoiceDialog::OnOK)
|
||||||
|
#else
|
||||||
EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK)
|
EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK)
|
||||||
|
#endif
|
||||||
EVT_LISTBOX_DCLICK(wxID_LISTBOX, wxSingleChoiceDialog::OnListBoxDClick)
|
EVT_LISTBOX_DCLICK(wxID_LISTBOX, wxSingleChoiceDialog::OnListBoxDClick)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user