// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
{
if ((punct.Find(paragraph[p]) != wxNOT_FOUND) || !linedrawn)
{
int blank = (paragraph[p] == ' ') ? 0 : 1;
{
if ((punct.Find(paragraph[p]) != wxNOT_FOUND) || !linedrawn)
{
int blank = (paragraph[p] == ' ') ? 0 : 1;
dc.DrawText( paragraph.Left(p + blank), pos , y) ;
y += height ;
paragraph = paragraph.Mid(p+1) ;
dc.DrawText( paragraph.Left(p + blank), pos , y) ;
y += height ;
paragraph = paragraph.Mid(p+1) ;
dc.Clear() ;
wxRect rect(0,0,m_width,m_height) ;
dc.SetFont(*wxSMALL_FONT) ;
dc.Clear() ;
wxRect rect(0,0,m_width,m_height) ;
dc.SetFont(*wxSMALL_FONT) ;
if (text[i] == 13 || text[i] == 10)
{
DrawParagraph(dc, paragraph,y);
if (text[i] == 13 || text[i] == 10)
{
DrawParagraph(dc, paragraph,y);
- if ( ret )
- {
- // adjust the size of the window to fit to the label unless autoresizing is
- // disabled
- if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
- {
- // temporary fix until layout measurement and drawing are in synch again
- Refresh() ;
- InvalidateBestSize();
- SetSize( GetBestSize() );
- }
- }
+ if ( ret )
+ {
+ // adjust the size of the window to fit to the label unless autoresizing is
+ // disabled
+ if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
+ {
+ // temporary fix until layout measurement and drawing are in synch again
+ Refresh() ;
+ InvalidateBestSize();
+ SetSize( GetBestSize() );
+ }
+ }