diff --git a/include/wx/headerctrl.h b/include/wx/headerctrl.h index f2270bf78e..8d677eec67 100644 --- a/include/wx/headerctrl.h +++ b/include/wx/headerctrl.h @@ -159,6 +159,12 @@ public: // compute column title width int GetColumnTitleWidth(const wxHeaderColumn& col); + // compute column title width for the column with the given index + int GetColumnTitleWidth(unsigned int idx) + { + return GetColumnTitleWidth(GetColumn(idx)); + } + // implementation only from now on // ------------------------------- diff --git a/interface/wx/headerctrl.h b/interface/wx/headerctrl.h index d8045cf6de..3980a9a01e 100644 --- a/interface/wx/headerctrl.h +++ b/interface/wx/headerctrl.h @@ -404,6 +404,16 @@ public: */ int GetColumnTitleWidth(const wxHeaderColumn& col); + /** + Returns width needed for the column with the given index. + + This is just a convenient wrapper for the overload taking + wxHeaderColumn. + + @since 3.1.3 + */ + int GetColumnTitleWidth(unsigned int idx); + protected: /** Method to be implemented by the derived classes to return the