Home All Groups Group Topic Archive Search About

Autosize Icon or Picture

Author
1 Jul 2009 11:04 PM
David
I want to position a command button or picturebox on a listbox line -- 
similar to what MS uses in their control properties listbox.

If listbox font size is adjustable, is their anyway to resize the icon in
the commandbutton or picturebox so it looks properly proportioned on the
line or do I need a separate icon for each font size?

Thanks
David

Author
2 Jul 2009 12:22 AM
Karl E. Peterson
David wrote:
> I want to position a command button or picturebox on a listbox line --
> similar to what MS uses in their control properties listbox.
>
> If listbox font size is adjustable, is their anyway to resize the icon in
> the commandbutton or picturebox so it looks properly proportioned on the
> line or do I need a separate icon for each font size?

I'm unclear what a command button or picturebox have to do with a listbox (iow, what
the heck you're really trying to do), but were you aware that an Image control does
have an AutoSize property?  The PaintPicture method can also resize graphics, if
that fits into your scheme.
--
..NET: It's About Trust!
http://vfred.mvps.org
Author
2 Jul 2009 1:45 AM
David
Thanks Karl:

Image control appears to work well.

David

Consider thread closed.


Show quoteHide quote
"Karl E. Peterson" <k***@exmvps.org> wrote in message
news:uNUQ3tq%23JHA.1608@TK2MSFTNGP02.phx.gbl...
> David wrote:
>> I want to position a command button or picturebox on a listbox line --
>> similar to what MS uses in their control properties listbox.
>>
>> If listbox font size is adjustable, is their anyway to resize the icon in
>> the commandbutton or picturebox so it looks properly proportioned on the
>> line or do I need a separate icon for each font size?
>
> I'm unclear what a command button or picturebox have to do with a listbox
> (iow, what the heck you're really trying to do), but were you aware that
> an Image control does have an AutoSize property?  The PaintPicture method
> can also resize graphics, if that fits into your scheme.
> --
> .NET: It's About Trust!
> http://vfred.mvps.org
>