added wxBU_EXACTFIT style
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
2b0ba7ee71
commit
7ef8bfc4c7
@ -24,6 +24,7 @@ almost any other window.
|
||||
\twocolitem{\windowstyle{wxBU\_TOP}}{Aligns the label to the top of the button. WIN32 only.}
|
||||
\twocolitem{\windowstyle{wxBU\_RIGHT}}{Right-justifies the bitmap label. WIN32 only.}
|
||||
\twocolitem{\windowstyle{wxBU\_BOTTOM}}{Aligns the label to the bottom of the button. WIN32 only.}
|
||||
\twocolitem{\windowstyle{wxBU\_EXACTFIT}}{Creates the button as small as possible instead of making it of the standard size (which is the default behaviour ).}
|
||||
\end{twocollist}
|
||||
|
||||
See also \helpref{window styles overview}{windowstyles}.
|
||||
|
@ -14,6 +14,23 @@
|
||||
|
||||
#if wxUSE_BUTTON
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxButton flags
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// all these flags are obsolete
|
||||
#define wxBU_NOAUTODRAW 0x0000
|
||||
#define wxBU_AUTODRAW 0x0004
|
||||
#define wxBU_LEFT 0x0040
|
||||
#define wxBU_TOP 0x0080
|
||||
#define wxBU_RIGHT 0x0100
|
||||
#define wxBU_BOTTOM 0x0200
|
||||
|
||||
// by default, the buttons will be created with some (system dependent)
|
||||
// minimal size to make them look nicer, giving this style will make them as
|
||||
// small as possible
|
||||
#define wxBU_EXACTFIT 0x0001
|
||||
|
||||
#include "wx/control.h"
|
||||
|
||||
class WXDLLEXPORT wxBitmap;
|
||||
|
@ -1195,16 +1195,6 @@ enum wxBorder
|
||||
#define wxSB_HORIZONTAL wxHORIZONTAL
|
||||
#define wxSB_VERTICAL wxVERTICAL
|
||||
|
||||
/*
|
||||
* wxButton flags (Win32 only)
|
||||
*/
|
||||
#define wxBU_AUTODRAW 0x0004
|
||||
#define wxBU_NOAUTODRAW 0x0000
|
||||
#define wxBU_LEFT 0x0040
|
||||
#define wxBU_TOP 0x0080
|
||||
#define wxBU_RIGHT 0x0100
|
||||
#define wxBU_BOTTOM 0x0200
|
||||
|
||||
/*
|
||||
* wxTreeCtrl flags
|
||||
*/
|
||||
|
@ -136,9 +136,12 @@ wxSize wxButton::DoGetBestClientSize() const
|
||||
|
||||
// for compatibility with other ports, the buttons default size is never
|
||||
// less than the standard one
|
||||
wxSize szDef = GetDefaultSize();
|
||||
if ( width < szDef.x )
|
||||
width = szDef.x;
|
||||
if ( !(GetWindowStyle() & wxBU_EXACTFIT) )
|
||||
{
|
||||
wxSize szDef = GetDefaultSize();
|
||||
if ( width < szDef.x )
|
||||
width = szDef.x;
|
||||
}
|
||||
|
||||
return wxSize(width, height);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user