Property value images are no longer shrinked horizontally

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59374 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2009-03-06 17:32:28 +00:00
parent a3281dbc1c
commit 4aee83345e
5 changed files with 63 additions and 24 deletions

View File

@@ -1531,6 +1531,21 @@ void FormMain::PopulateWithExamples ()
// Set value after limiting so that it will be applied
pg->SetPropertyValue( wxT("StringProperty"), wxT("some text") );
// Add string property with arbitrarily wide bitmap in front of it. We
// intentionally lower-than-typical row height here so that the ugly
// scaling code wont't be run.
pg->Append( new wxStringProperty( wxT("StringPropertyWithBitmap"),
wxPG_LABEL,
wxT("Test Text")) );
wxBitmap myTestBitmap(60, 15, 32);
wxMemoryDC mdc;
mdc.SelectObject(myTestBitmap);
mdc.Clear();
mdc.SetPen(*wxBLACK);
mdc.DrawLine(0, 0, 60, 15);
mdc.SelectObject(wxNullBitmap);
pg->SetPropertyImage( wxT("StringPropertyWithBitmap"), myTestBitmap );
// this value array would be optional if values matched string indexes
//long flags_prop_values[] = { wxICONIZE, wxCAPTION, wxMINIMIZE_BOX, wxMAXIMIZE_BOX };