Merge recent changes from 2.8 branch.
Make updates for recent changes on CVS HEAD. Remove or workaround deprecated items. Fix compile errors. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45088 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1336,7 +1336,7 @@ int wxTreeListHeaderWindow::XToCol(int x)
|
||||
|
||||
void wxTreeListHeaderWindow::RefreshColLabel(int col)
|
||||
{
|
||||
if ( col > GetColumnCount() )
|
||||
if ( col >= GetColumnCount() )
|
||||
return;
|
||||
|
||||
int x = 0;
|
||||
@@ -3600,7 +3600,7 @@ void wxTreeListMainWindow::OnChar (wxKeyEvent &event) {
|
||||
default:
|
||||
if (event.GetKeyCode() >= (int)' ') {
|
||||
if (!m_findTimer->IsRunning()) m_findStr.Clear();
|
||||
m_findStr.Append (event.GetKeyCode());
|
||||
m_findStr.Append ((char)event.GetKeyCode());
|
||||
m_findTimer->Start (FIND_TIMER_TICKS, wxTIMER_ONE_SHOT);
|
||||
wxTreeItemId prev = m_curItem? (wxTreeItemId*)m_curItem: (wxTreeItemId*)NULL;
|
||||
while (true) {
|
||||
@@ -4681,6 +4681,18 @@ int wxTreeListCtrl::GetColumnCount() const
|
||||
|
||||
void wxTreeListCtrl::SetColumnWidth(int column, int width)
|
||||
{
|
||||
if (width == wxLIST_AUTOSIZE_USEHEADER)
|
||||
{
|
||||
wxFont font = m_header_win->GetFont();
|
||||
m_header_win->GetTextExtent(m_header_win->GetColumnText(column), &width, NULL, NULL, NULL, font.Ok()? &font: NULL);
|
||||
//search wxTreeListHeaderWindow::OnPaint to understand this:
|
||||
width += 2*EXTRA_WIDTH + MARGIN;
|
||||
}
|
||||
else if (width == wxLIST_AUTOSIZE)
|
||||
{
|
||||
width = m_main_win->GetBestColumnWidth(column);
|
||||
}
|
||||
|
||||
m_header_win->SetColumnWidth (column, width);
|
||||
m_header_win->Refresh();
|
||||
}
|
||||
|
Reference in New Issue
Block a user