BEGIN_EVENT_TABLE(wxListHeaderWindow,wxWindow)
EVT_PAINT (wxListHeaderWindow::OnPaint)
EVT_MOUSE_EVENTS (wxListHeaderWindow::OnMouse)
- EVT_SET_FOCUS (wxListHeaderWindow::OnSetFocus)
END_EVENT_TABLE()
void wxListHeaderWindow::Init()
}
}
-void wxListHeaderWindow::OnSetFocus( wxFocusEvent &WXUNUSED(event) )
-{
- m_owner->SetFocus();
- m_owner->Update();
-}
-
bool wxListHeaderWindow::SendListEvent(wxEventType type, const wxPoint& pos)
{
wxWindow *parent = GetParent();
wxListMainWindow::wxListMainWindow( wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
- const wxSize& size,
- long style,
- const wxString &name )
- : wxWindow( parent, id, pos, size, style, name )
+ const wxSize& size )
+ : wxWindow( parent, id, pos, size,
+ wxWANTS_CHARS | wxBORDER_NONE )
{
Init();
wxCHECK_MSG( (item >= 0) && ((size_t)item < GetItemCount()), NULL,
wxT("wrong index in wxGenericListCtrl::EditLabel()") );
- wxASSERT_MSG( textControlClass->IsKindOf(CLASSINFO(wxTextCtrl)),
+ wxASSERT_MSG( textControlClass->IsKindOf(wxCLASSINFO(wxTextCtrl)),
wxT("EditLabel() needs a text control") );
size_t itemEdit = (size_t)item;
validator, name ) )
return false;
-#ifdef __WXGTK__
- style &= ~wxBORDER_MASK;
- style |= wxBORDER_THEME;
-#endif
-
- m_mainWin = new wxListMainWindow( this, wxID_ANY, wxPoint(0, 0), size, style );
+ m_mainWin = new wxListMainWindow(this, wxID_ANY, wxPoint(0, 0), size);
SetTargetWindow( m_mainWin );
wxListCtrlBase::DoScreenToClient(x, y);
}
-void wxGenericListCtrl::SetFocus()
-{
- // The test in window.cpp fails as we are a composite
- // window, so it checks against "this", but not m_mainWin.
- if ( DoFindFocus() != this )
- m_mainWin->SetFocus();
-}
-
wxSize wxGenericListCtrl::DoGetBestClientSize() const
{
- // Something is better than nothing even if this is completely arbitrary.
- wxSize sizeBest(100, 80);
+ // The base class version can compute the best size in report view only.
+ wxSize sizeBest = wxListCtrlBase::DoGetBestClientSize();
if ( !InReportView() )
{