-
- // Find the widest line
- for(unsigned int i = 0; i < count; i++) {
- wxString str(GetString(i));
- GetTextExtent(str, &wLine, NULL);
- lbWidth = wxMax(lbWidth, wLine);
+ for ( unsigned int i = 0; i < count; i++ )
+ {
+ GetTextExtent(GetString(i), &wLine, NULL);
+ if ( wLine > lbWidth )
+ lbWidth = wLine;