-/* Split message, using constraints to position controls */
-static wxSize wxSplitMessage2( const wxString &message, wxWindow *parent )
-{
- int y = 10;
- int w = 50;
- wxString line( _T("") );
- for (size_t pos = 0; pos < message.Len(); pos++)
- {
- if (message[pos] == _T('\n'))
- {
- if (!line.IsEmpty())
- {
- wxStaticText *s1 = new wxStaticText( parent, -1, line, wxPoint(15,y) );
- wxSize size1( s1->GetSize() );
- if (size1.x > w) w = size1.x;
- line = _T("");
- }
- y += 18;
- }
- else
- {
- line += message[pos];
- }
- }
-
- if (!line.IsEmpty())
- {
- wxStaticText *s2 = new wxStaticText( parent, -1, line, wxPoint(15,y) );
- wxSize size2( s2->GetSize() );
- if (size2.x > w) w = size2.x;
- }
-
- y += 18;
-
- return wxSize(w+30,y);
-}