Improve frame size in the listctrl sample
Make it bigger on high DPI displays and smaller on normal ones.
This commit is contained in:
parent
dc627da250
commit
cfdfd14c59
1 changed files with 4 additions and 1 deletions
|
|
@ -170,7 +170,7 @@ wxEND_EVENT_TABLE()
|
|||
|
||||
// My frame constructor
|
||||
MyFrame::MyFrame(const wxString& title)
|
||||
: wxFrame(nullptr, wxID_ANY, title, wxDefaultPosition, wxSize(600, 500))
|
||||
: wxFrame(nullptr, wxID_ANY, title)
|
||||
{
|
||||
m_listCtrl = nullptr;
|
||||
m_logWindow = nullptr;
|
||||
|
|
@ -293,6 +293,9 @@ MyFrame::MyFrame(const wxString& title)
|
|||
|
||||
RecreateList(wxLC_REPORT | wxLC_SINGLE_SEL);
|
||||
|
||||
// Make the list control big enough to show its initial contents.
|
||||
m_listCtrl->SetInitialSize(FromDIP(wxSize(600, 300)));
|
||||
|
||||
#ifdef __WXMSW__
|
||||
// this is useful to know specially when debugging :)
|
||||
wxLogMessage("Your version of comctl32.dll is: %d",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue