Add support for icons in wxAUI panes title bars.
Add wxAuiPaneInfo::Icon() method and shows its use in the sample. Closes #12856. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -916,9 +916,19 @@ MyFrame::MyFrame(wxWindow* parent,
|
||||
CloseButton(true).MaximizeButton(true));
|
||||
|
||||
wxWindow* wnd10 = CreateTextCtrl(wxT("This pane will prompt the user before hiding."));
|
||||
|
||||
// Give this pane an icon, too, just for testing.
|
||||
int iconSize = m_mgr.GetArtProvider()->GetMetric(wxAUI_DOCKART_CAPTION_SIZE);
|
||||
|
||||
// Make it even to use 16 pixel icons with default 17 caption height.
|
||||
iconSize &= ~1;
|
||||
|
||||
m_mgr.AddPane(wnd10, wxAuiPaneInfo().
|
||||
Name(wxT("test10")).Caption(wxT("Text Pane with Hide Prompt")).
|
||||
Bottom().Layer(1).Position(1));
|
||||
Bottom().Layer(1).Position(1).
|
||||
Icon(wxArtProvider::GetBitmap(wxART_WARNING,
|
||||
wxART_OTHER,
|
||||
wxSize(iconSize, iconSize))));
|
||||
|
||||
m_mgr.AddPane(CreateSizeReportCtrl(), wxAuiPaneInfo().
|
||||
Name(wxT("test11")).Caption(wxT("Fixed Pane")).
|
||||
|
Reference in New Issue
Block a user