From: Roger Gammans Date: Sun, 8 Dec 2002 16:04:36 +0000 (+0000) Subject: new member functio of wxDbColInfo to allow two step creation , to be X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f24badde9a0efe4e2a18057045e044542f582158 new member functio of wxDbColInfo to allow two step creation , to be descibed in the docs. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18110 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/dbgrid.h b/include/wx/dbgrid.h index af4145e7b5..e5c9fa6b08 100644 --- a/include/wx/dbgrid.h +++ b/include/wx/dbgrid.h @@ -78,6 +78,18 @@ public: //Recurse to find length. int Length() { return (m_next ? m_next->Length() +1 : 1); } + // Adds a new column info (2 step creation) + void AddColInfo (int colNo, + wxString type, + wxString title) + { + GetLast()->m_next = new wxDbGridColInfo (colNo, type, title, NULL); + } + + // Searches last + wxDbGridColInfo *GetLast() { return (m_next ? m_next->GetLast() : this); } + + protected: wxDbGridColInfoBase m_data; wxDbGridColInfo *m_next;