#if _USE_VISATTR
wxVisualAttributes attr = wxPanel::GetClassDefaultAttributes();
- SetDefaultForegroundColour( attr.colFg );
- SetDefaultBackgroundColour( attr.colBg );
- SetDefaultFont( attr.font );
+ SetOwnForegroundColour( attr.colFg );
+ SetOwnBackgroundColour( attr.colBg );
+ if (!m_hasFont)
+ SetOwnFont( attr.font );
#else
- SetDefaultForegroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
- SetDefaultBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
- SetDefaultFont( wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT ));
+ SetOwnForegroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
+ SetOwnBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE));
+ if (!m_hasFont)
+ SetOwnFont( wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT ));
#endif
}
sx = parentSize.x - myPos.x;
if (mySize.x > sx)
sx = mySize.x;
- SetSize(sx, wxDefaultSize.y);
+ SetSize(sx, wxDefaultCoord);
event.Skip();
}
SetScrollbars( 0, 0, 0, 0, 0, 0 );
wxVisualAttributes attr = wxGenericListCtrl::GetClassDefaultAttributes();
- SetDefaultForegroundColour( attr.colFg );
- SetDefaultBackgroundColour( attr.colBg );
- SetDefaultFont( attr.font );
+ SetOwnForegroundColour( attr.colFg );
+ SetOwnBackgroundColour( attr.colBg );
+ if (!m_hasFont)
+ SetOwnFont( attr.font );
}
wxListMainWindow::~wxListMainWindow()
m_lineLastClicked = current;
size_t oldCurrent = m_current;
- bool cmdModifierDown;
-#ifdef __WXMAC__
- cmdModifierDown = event.MetaDown();
-#else
- cmdModifierDown = event.ControlDown();
-#endif
+ bool cmdModifierDown = event.CmdDown();
if ( IsSingleSel() || !(cmdModifierDown || event.ShiftDown()) )
{
HighlightAll( false );
{
wxASSERT_MSG( !IsVirtual(), _T("can't be used with virtual control") );
- size_t count = GetItemCount();
- wxCHECK_RET( item.m_itemId >= 0 && (size_t)item.m_itemId <= count,
- _T("invalid item index") );
+ int count = GetItemCount();
+ wxCHECK_RET( item.m_itemId >= 0, _T("invalid item index") );
+ if (item.m_itemId > count)
+ item.m_itemId = count;
+
size_t id = item.m_itemId;
m_dirty = true;