// Created: Sep-01-2006
// Id: $Id$
// Copyright: (c) 2006 Jaakko Salli
-// License: wxWindows license
+// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// ============================================================================
for ( unsigned int n = 0; n < count; n++ )
{
items.Add(m_combobox->GetString(n));
- bitmaps.Add(new wxBitmap(m_combobox->GetItemBitmap(n)));
+ wxBitmap bmp = m_combobox->GetItemBitmap(n);
+ bitmaps.Add(new wxBitmap(bmp));
}
m_sizerCombo->Detach( m_combobox );
m_sizerCombo->Add(m_combobox, 0, wxGROW | wxALL, 5);
m_sizerCombo->Layout();
- // Allow changing height inorder to demonstrate flexible
+ // Allow changing height in order to demonstrate flexible
// size of image "thumbnail" painted in the control itself.
long h = 0;
m_textChangeHeight->GetValue().ToLong(&h);
#if wxUSE_IMAGE
wxASSERT(fn.FileExists());
wxImage image(fn.GetFullPath());
- wxASSERT(image.Ok());
+ wxASSERT(image.IsOk());
RescaleImage(image, foundSize.x, foundSize.y);
wxBitmap bmp(image);
- wxASSERT( bmp.Ok() );
+ wxASSERT( bmp.IsOk() );
#else
wxBitmap bmp(wxNullBitmap);
#endif
wxASSERT_MSG( s == m_combobox->GetValue(),
wxT("event and combobox values should be the same") );
- if (event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER)
+ if (event.GetEventType() == wxEVT_TEXT_ENTER)
{
wxLogMessage(wxT("BitmapCombobox enter pressed (now '%s')"), s.c_str());
}
}
wxImage image(filepath);
- if ( image.Ok() )
+ if ( image.IsOk() )
{
// Rescale very large images
int ow = image.GetWidth();
::wxSetCursor( *wxHOURGLASS_CURSOR );
- if ( filepath.length() )
+ if ( !filepath.empty() )
{
if ( pStr )
{