Set minsize and implement DoGetBestSize
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2730,6 +2730,7 @@ private:
|
|||||||
void OnListBox(wxCommandEvent& evt);
|
void OnListBox(wxCommandEvent& evt);
|
||||||
void OnIdle(wxIdleEvent& evt);
|
void OnIdle(wxIdleEvent& evt);
|
||||||
|
|
||||||
|
virtual wxSize DoGetBestSize() const;
|
||||||
|
|
||||||
// Turn notifications from Scintilla into events
|
// Turn notifications from Scintilla into events
|
||||||
void NotifyChange();
|
void NotifyChange();
|
||||||
|
@@ -168,6 +168,8 @@ void wxStyledTextCtrl::Create(wxWindow *parent,
|
|||||||
// Put Scintilla into unicode (UTF-8) mode
|
// Put Scintilla into unicode (UTF-8) mode
|
||||||
SetCodePage(wxSTC_CP_UTF8);
|
SetCodePage(wxSTC_CP_UTF8);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
SetBestFittingSize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2757,6 +2759,14 @@ void wxStyledTextCtrl::OnIdle(wxIdleEvent& evt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
wxSize wxStyledTextCtrl::DoGetBestSize() const
|
||||||
|
{
|
||||||
|
// What would be the best size for a wxSTC?
|
||||||
|
// Just give a reasonable minimum until something else can be figured out.
|
||||||
|
return wxSize(200,100);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Turn notifications from Scintilla into events
|
// Turn notifications from Scintilla into events
|
||||||
|
|
||||||
|
@@ -168,6 +168,8 @@ void wxStyledTextCtrl::Create(wxWindow *parent,
|
|||||||
// Put Scintilla into unicode (UTF-8) mode
|
// Put Scintilla into unicode (UTF-8) mode
|
||||||
SetCodePage(wxSTC_CP_UTF8);
|
SetCodePage(wxSTC_CP_UTF8);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
SetBestFittingSize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -566,6 +568,14 @@ void wxStyledTextCtrl::OnIdle(wxIdleEvent& evt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
wxSize wxStyledTextCtrl::DoGetBestSize() const
|
||||||
|
{
|
||||||
|
// What would be the best size for a wxSTC?
|
||||||
|
// Just give a reasonable minimum until something else can be figured out.
|
||||||
|
return wxSize(200,100);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Turn notifications from Scintilla into events
|
// Turn notifications from Scintilla into events
|
||||||
|
|
||||||
|
@@ -246,6 +246,7 @@ private:
|
|||||||
void OnListBox(wxCommandEvent& evt);
|
void OnListBox(wxCommandEvent& evt);
|
||||||
void OnIdle(wxIdleEvent& evt);
|
void OnIdle(wxIdleEvent& evt);
|
||||||
|
|
||||||
|
virtual wxSize DoGetBestSize() const;
|
||||||
|
|
||||||
// Turn notifications from Scintilla into events
|
// Turn notifications from Scintilla into events
|
||||||
void NotifyChange();
|
void NotifyChange();
|
||||||
|
@@ -2730,6 +2730,7 @@ private:
|
|||||||
void OnListBox(wxCommandEvent& evt);
|
void OnListBox(wxCommandEvent& evt);
|
||||||
void OnIdle(wxIdleEvent& evt);
|
void OnIdle(wxIdleEvent& evt);
|
||||||
|
|
||||||
|
virtual wxSize DoGetBestSize() const;
|
||||||
|
|
||||||
// Turn notifications from Scintilla into events
|
// Turn notifications from Scintilla into events
|
||||||
void NotifyChange();
|
void NotifyChange();
|
||||||
|
@@ -168,6 +168,8 @@ void wxStyledTextCtrl::Create(wxWindow *parent,
|
|||||||
// Put Scintilla into unicode (UTF-8) mode
|
// Put Scintilla into unicode (UTF-8) mode
|
||||||
SetCodePage(wxSTC_CP_UTF8);
|
SetCodePage(wxSTC_CP_UTF8);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
SetBestFittingSize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2757,6 +2759,14 @@ void wxStyledTextCtrl::OnIdle(wxIdleEvent& evt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
wxSize wxStyledTextCtrl::DoGetBestSize() const
|
||||||
|
{
|
||||||
|
// What would be the best size for a wxSTC?
|
||||||
|
// Just give a reasonable minimum until something else can be figured out.
|
||||||
|
return wxSize(200,100);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Turn notifications from Scintilla into events
|
// Turn notifications from Scintilla into events
|
||||||
|
|
||||||
|
@@ -168,6 +168,8 @@ void wxStyledTextCtrl::Create(wxWindow *parent,
|
|||||||
// Put Scintilla into unicode (UTF-8) mode
|
// Put Scintilla into unicode (UTF-8) mode
|
||||||
SetCodePage(wxSTC_CP_UTF8);
|
SetCodePage(wxSTC_CP_UTF8);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
SetBestFittingSize(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -566,6 +568,14 @@ void wxStyledTextCtrl::OnIdle(wxIdleEvent& evt) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
wxSize wxStyledTextCtrl::DoGetBestSize() const
|
||||||
|
{
|
||||||
|
// What would be the best size for a wxSTC?
|
||||||
|
// Just give a reasonable minimum until something else can be figured out.
|
||||||
|
return wxSize(200,100);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
// Turn notifications from Scintilla into events
|
// Turn notifications from Scintilla into events
|
||||||
|
|
||||||
|
@@ -246,6 +246,7 @@ private:
|
|||||||
void OnListBox(wxCommandEvent& evt);
|
void OnListBox(wxCommandEvent& evt);
|
||||||
void OnIdle(wxIdleEvent& evt);
|
void OnIdle(wxIdleEvent& evt);
|
||||||
|
|
||||||
|
virtual wxSize DoGetBestSize() const;
|
||||||
|
|
||||||
// Turn notifications from Scintilla into events
|
// Turn notifications from Scintilla into events
|
||||||
void NotifyChange();
|
void NotifyChange();
|
||||||
|
Reference in New Issue
Block a user