From 4c553c1db2519ad15295748294620bf6a547c445 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 16 Jul 2019 18:22:33 +0200 Subject: [PATCH] Document delayed effect of wxDataViewColumn::SetWidth() in wxGTK It may be surprising that calling GetWidth() after SetWidth(100) still returns 0, so at least document this behaviour (fixing it doesn't seem to be easily possible). --- interface/wx/dataview.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interface/wx/dataview.h b/interface/wx/dataview.h index 1c9076a908..90bb1c2aaf 100644 --- a/interface/wx/dataview.h +++ b/interface/wx/dataview.h @@ -2707,6 +2707,12 @@ enum wxDataViewColumnFlags An instance of wxDataViewRenderer is used by this class to render its data. + @note In wxGTK, setting the width of the column doesn't happen immediately + when SetWidth() is called, but only slightly later and GetWidth() will + return the old width (0 initially) until this happens. If the column + widths are set before wxDataViewCtrl is initially shown, they will only + be effectively set when it becomes visible. + @library{wxcore} @category{dvc} */