added wxTBK_HORZ_LAYOUT (heavily modified patch 1855678)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e45080c10b
commit
050d159c4a
@ -41,9 +41,11 @@ wxBookCtrlBase (see \helpref{wxBookCtrl overview}{wxbookctrloverview})\\
|
|||||||
|
|
||||||
\twocolwidtha{5cm}
|
\twocolwidtha{5cm}
|
||||||
\begin{twocollist}\itemsep=0pt
|
\begin{twocollist}\itemsep=0pt
|
||||||
|
|
||||||
\twocolitem{\windowstyle{wxBK\_DEFAULT}}{Choose the default location for the
|
\twocolitem{\windowstyle{wxBK\_DEFAULT}}{Choose the default location for the
|
||||||
labels depending on the current platform (currently always the top).}
|
labels depending on the current platform (currently always the top).}
|
||||||
|
\twocolitem{\windowstyle{wxTBK\_HORZ\_LAYOUT}}{Shows the text and the icons
|
||||||
|
alongside, not vertically stacked (only implement under Windows and GTK 2
|
||||||
|
platforms as it relies on \texttt{wxTB\_HORZ\_LAYOUT} flag support).}
|
||||||
\end{twocollist}
|
\end{twocollist}
|
||||||
|
|
||||||
\wxheading{See also}
|
\wxheading{See also}
|
||||||
|
@ -28,6 +28,9 @@ extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_TOOLBOOK_PAGE_CHANGING;
|
|||||||
// Use wxButtonToolBar
|
// Use wxButtonToolBar
|
||||||
#define wxBK_BUTTONBAR 0x0100
|
#define wxBK_BUTTONBAR 0x0100
|
||||||
|
|
||||||
|
// Use wxTB_HORZ_LAYOUT style for the controlling toolbar
|
||||||
|
#define wxTBK_HORZ_LAYOUT 0x8000
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxToolbook
|
// wxToolbook
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@ -87,9 +87,14 @@ bool wxToolbook::Create(wxWindow *parent,
|
|||||||
wxDefaultValidator, name) )
|
wxDefaultValidator, name) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int orient = wxTB_HORIZONTAL;
|
int tbFlags = wxTB_TEXT | wxTB_FLAT | wxBORDER_NONE;
|
||||||
if ( (style & (wxBK_LEFT | wxBK_RIGHT)) != 0)
|
if ( (style & (wxBK_LEFT | wxBK_RIGHT)) != 0 )
|
||||||
orient = wxTB_VERTICAL;
|
tbFlags |= wxTB_VERTICAL;
|
||||||
|
else
|
||||||
|
tbFlags |= wxTB_HORIZONTAL;
|
||||||
|
|
||||||
|
if ( style & wxTBK_HORZ_LAYOUT )
|
||||||
|
tbFlags |= wxTB_HORZ_LAYOUT;
|
||||||
|
|
||||||
// TODO: make more configurable
|
// TODO: make more configurable
|
||||||
|
|
||||||
@ -102,7 +107,7 @@ bool wxToolbook::Create(wxWindow *parent,
|
|||||||
wxID_ANY,
|
wxID_ANY,
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
wxDefaultSize,
|
wxDefaultSize,
|
||||||
orient|wxTB_TEXT|wxTB_FLAT|wxNO_BORDER
|
tbFlags
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -114,7 +119,7 @@ bool wxToolbook::Create(wxWindow *parent,
|
|||||||
wxID_ANY,
|
wxID_ANY,
|
||||||
wxDefaultPosition,
|
wxDefaultPosition,
|
||||||
wxDefaultSize,
|
wxDefaultSize,
|
||||||
orient|wxTB_TEXT|wxTB_FLAT|wxTB_NODIVIDER|wxNO_BORDER
|
tbFlags | wxTB_NODIVIDER
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user