PC Review


Reply
Thread Tools Rate Thread

How to expose the Image-Size-Property of an ImageList in a User Control?

 
 
Jan Liße
Guest
Posts: n/a
 
      10th Dec 2003
Hallo,
I've got a user control containing an ImageList and I want to enable
the user of my control to change the size of the Images stored
in the ImageList during design-time. Any suggestions how I can manage this?
Thanks in advance,
Jan


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      10th Dec 2003
* "Jan Liße" <(E-Mail Removed)> scripsit:
> I've got a user control containing an ImageList and I want to enable
> the user of my control to change the size of the Images stored
> in the ImageList during design-time. Any suggestions how I can manage this?


Add two properties for the size (or a property of type 'Size') which set
the size of the images in the list.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
 
Reply With Quote
 
Jan Liße
Guest
Posts: n/a
 
      10th Dec 2003
I still have a question.
In the class of my control i declared in the header of my class: "private
Size UserdefinedSize"
and I added the property:
----------------------------------------------------------------------------
------------------
public Size UserdefinedSize
{
get
{
return UserDefinedSize;
}
set
{
UserDefinedSize = value;
}
}
----------------------------------------------------------------------------
--------------------

I think it is ok so far. But i am not sure how to set this property now for
my ImageList.ImageSize...
I tried: "myImageList1.ImageSize = UserdefinedSize" in the constructor of my
class but that leads to build-errors (class already contains a definition of
"UserDefinedSize")!




"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)> schrieb im Newsbeitrag
news:br6oa9$28biv8$(E-Mail Removed)...
> * "Jan Liße" <(E-Mail Removed)> scripsit:
> > I've got a user control containing an ImageList and I want to enable
> > the user of my control to change the size of the Images stored
> > in the ImageList during design-time. Any suggestions how I can manage

this?
>
> Add two properties for the size (or a property of type 'Size') which set
> the size of the images in the list.
>
> --
> Herfried K. Wagner [MVP]
> <http://www.mvps.org/dotnet>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ImageList Component: Adjust Image Size Per Image senfo Microsoft C# .NET 2 13th Feb 2007 03:22 PM
how to add Image array / ImageList.ImageCollection to a control? Kristopher Wragg Microsoft C# .NET 1 24th Apr 2006 01:40 PM
Set Image.Picture property to an item in a ImageList control Craig Buchanan Microsoft Access Form Coding 1 14th Dec 2004 09:38 PM
override Size property form a User Control? Michel Walsh Microsoft C# .NET 2 25th Aug 2004 06:04 PM
Re: vb.net:imagelist loses images when the image size property is changed Carl Prothman [MVP] Microsoft Dot NET Framework Forms 0 26th Jul 2003 08:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:29 PM.