Images from files shrink?

P

Peter Oliphant

I created a BMP file called 'map.bmp' that is 50x50 pixels in size. I then
execute the following code:

Image_List = gcnew ImageList() ;
Image_List->Images->Add( Image::FromFile( "map.bmp" ) ) ;

button = gcnew Button() ;

button->ImageList = Image_List ;

button->ImageIndex = 0 ;

I also make sure the button's dimensions are 50x50. What happens though is
that the image in 'map.bmp' is displayed at a much smaller size and in the
middle of the button, something like 17x17 in size!

Why is this happening? I've tried saving the image in both 24 and 32 bit
formats, no difference between the two...

In general, how do I affect the displayed SIZE of an image in a button's
image list so that it matches the button size?

HELP!

[==Peter==]
 
P

Peter Oliphant

Figured it out. The ImageList has a property called ImageSize. This sets the
display size of its images.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top