void wxTreeListHeaderWindow::RefreshColLabel(int col)
{
- if ( col > GetColumnCount() )
+ if ( col >= GetColumnCount() )
return;
int x = 0;
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) {
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();
}