Add wxControl::GetSizeFromText() helper function
Add the helper function that combines GetSizeFromTextSize() and GetTextExtent() as they are often used together.
This commit is contained in:
parent
af4076865d
commit
9ef1b1529d
2 changed files with 26 additions and 0 deletions
|
|
@ -115,6 +115,11 @@ public:
|
|||
wxSize GetSizeFromTextSize(const wxSize& tsize) const
|
||||
{ return DoGetSizeFromTextSize(tsize.x, tsize.y); }
|
||||
|
||||
wxSize GetSizeFromText(const wxString& text) const
|
||||
{
|
||||
return GetSizeFromTextSize(GetTextExtent(text).GetWidth());
|
||||
}
|
||||
|
||||
|
||||
// static utilities for mnemonics char (&) handling
|
||||
// ------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue