expansion and increased list size for larger screens.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44620
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#endif
#include "wx/statline.h"
#endif
#include "wx/statline.h"
+#include "wx/settings.h"
#include "wx/generic/choicdgg.h"
// ----------------------------------------------------------------------------
#include "wx/generic/choicdgg.h"
// ----------------------------------------------------------------------------
m_listbox->SetSelection(0);
topsizer->
m_listbox->SetSelection(0);
topsizer->
- Add(m_listbox, wxSizerFlags().Expand().TripleBorder(wxLEFT | wxRIGHT));
+ Add(m_listbox, wxSizerFlags().Expand().Proportion(1).TripleBorder(wxLEFT | wxRIGHT));
// 3) buttons if any
wxSizer *
// 3) buttons if any
wxSizer *
wxListBoxBase *wxAnyChoiceDialog::CreateList(int n, const wxString *choices, long styleLbox)
{
wxListBoxBase *wxAnyChoiceDialog::CreateList(int n, const wxString *choices, long styleLbox)
{
+ wxSize size = wxDefaultSize;
+ if (wxSystemSettings::GetScreenType() > wxSYS_SCREEN_PDA)
+ size = wxSize(300, 200);
return new wxListBox( this, wxID_LISTBOX,
return new wxListBox( this, wxID_LISTBOX,
- wxDefaultPosition, wxDefaultSize,
+ wxDefaultPosition, size,
n, choices,
styleLbox );
}
n, choices,
styleLbox );
}
#else
styleLbox = wxLB_ALWAYS_SB | wxLB_EXTENDED;
#endif
#else
styleLbox = wxLB_ALWAYS_SB | wxLB_EXTENDED;
#endif
if ( !wxAnyChoiceDialog::Create(parent, message, caption,
n, choices,
style, pos,
if ( !wxAnyChoiceDialog::Create(parent, message, caption,
n, choices,
style, pos,
{
checkListBox->Check(selections[n]);
}
{
checkListBox->Check(selections[n]);
}
// first clear all currently selected items
size_t n,
count = m_listbox->GetCount();
// first clear all currently selected items
size_t n,
count = m_listbox->GetCount();
wxListBoxBase *wxMultiChoiceDialog::CreateList(int n, const wxString *choices, long styleLbox)
{
wxListBoxBase *wxMultiChoiceDialog::CreateList(int n, const wxString *choices, long styleLbox)
{
+ wxSize size = wxDefaultSize;
+ if (wxSystemSettings::GetScreenType() > wxSYS_SCREEN_PDA)
+ size = wxSize(300, 200);
+
return new wxCheckListBox( this, wxID_LISTBOX,
return new wxCheckListBox( this, wxID_LISTBOX,
- wxDefaultPosition, wxDefaultSize,
+ wxDefaultPosition, size,
n, choices,
styleLbox );
}
n, choices,
styleLbox );
}