[ wxwindows-Patches-1878512 ] grid - EndBatch() or resizing bug workaround

SourceForge.net noreply at sourceforge.net
Sun Feb 3 06:11:03 PST 2008


Patches item #1878512, was opened at 2008-01-23 22:28
Message generated for change (Comment added) made by vadz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1878512&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Grid
Group: bug fix
>Status: Closed
>Resolution: Accepted
Priority: 5
Private: No
Submitted By: Marcin Wojdyr (wojdyr)
Assigned to: Nobody/Anonymous (nobody)
Summary: grid - EndBatch() or resizing bug workaround

Initial Comment:

wxGTK, SVN
 
The code like this:

g = new wxGrid(...);
g->CreateGrid(1, 2);
g->SetColLabelSize(20);
g->BeginBatch();
g->EndBatch();

causes:

Gtk-CRITICAL **: gtk_widget_set_size_request: assertion `width >= -1' failed

because 

wxGrid::CalcWindowSizes() is called from EndBatch() and ClientSize is smaller than m_rowLabelWidth,m_colLabelHeight 

The fix (or workaround) is attached.



----------------------------------------------------------------------

Comment By: Vadim Zeitlin (vadz)
Date: 2008-02-03 15:11

Message:
Logged In: YES 
user_id=71618
Originator: NO

Thank you for your patch, it has been applied to both svn trunk and 2.8
branch!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1878512&group_id=9863




More information about the wx-dev mailing list