mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-08-17 17:02:51 +08:00
Improve frame size in the listctrl sample
Make it bigger on high DPI displays and smaller on normal ones.
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user