void wxHeaderCtrlBase::OnSeparatorDClick(wxHeaderCtrlEvent& event) { const unsigned col = event.GetColumn(); int w = wxWindowBase::GetTextExtent(GetColumn(col).GetTitle()).x; w += 4*GetCharWidth(); // add some arbitrary margins around text if ( !UpdateColumnWidthToFit(col, w) ) event.Skip(); else UpdateColumn(col); }
void wxHeaderCtrlBase::OnSeparatorDClick(wxHeaderCtrlEvent& event) { const unsigned col = event.GetColumn(); const wxHeaderColumn& column = GetColumn(col); if ( !column.IsResizeable() ) { event.Skip(); return; } int w = GetColumnTitleWidth(column); if ( !UpdateColumnWidthToFit(col, w) ) event.Skip(); else UpdateColumn(col); }
void wxHeaderCtrlBase::OnRClick(wxHeaderCtrlEvent& event) { if ( !HasFlag(wxHD_ALLOW_HIDE) ) { event.Skip(); return; } ShowColumnsMenu(ScreenToClient(wxGetMousePosition())); }