PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms ImageList collection in a control

Reply

ImageList collection in a control

 
Thread Tools Rate Thread
Old 11-02-2006, 05:43 AM   #1
tinyabs
Guest
 
Posts: n/a
Default ImageList collection in a control


Hi,

This is my custom control. When I try to add a image, I got the following
error message.

"Parameter must be of type Image. Parameter name: value"

public class AControl : UserControl
{

public ImageList LargeImages {

get { return FLargeImages; }

set {

FLargeImages = value;

Invalidate();

}

}
}






  Reply With Quote
Old 11-02-2006, 06:25 AM   #2
tinyabs
Guest
 
Posts: n/a
Default Re: ImageList collection in a control

I found the answer.
public ImageList.ImageCollection argeIcons
{
get{ˇ*}
set{ˇ*}


}


"tinyabs" <nospam@me.com> wrote in message
news:43ed799c@news.starhub.net.sg...
> Hi,
>
> This is my custom control. When I try to add a image, I got the following
> error message.
>
> "Parameter must be of type Image. Parameter name: value"
>
> public class AControl : UserControl
> {
>
> public ImageList LargeImages {
>
> get { return FLargeImages; }
>
> set {
>
> FLargeImages = value;
>
> Invalidate();
>
> }
>
> }
> }
>
>
>
>
>
>



  Reply With Quote
Old 11-02-2006, 06:37 AM   #3
tinyabs
Guest
 
Posts: n/a
Default Re: ImageList collection in a control

But how do i write the get and set accessors?

"tinyabs" <nospam@me.com> wrote in message
news:43ed8364$1@news.starhub.net.sg...
>I found the answer.
> public ImageList.ImageCollection argeIcons
> {
> get{ˇ*}
> set{ˇ*}
>
>
> }
>
>
> "tinyabs" <nospam@me.com> wrote in message
> news:43ed799c@news.starhub.net.sg...
>> Hi,
>>
>> This is my custom control. When I try to add a image, I got the following
>> error message.
>>
>> "Parameter must be of type Image. Parameter name: value"
>>
>> public class AControl : UserControl
>> {
>>
>> public ImageList LargeImages {
>>
>> get { return FLargeImages; }
>>
>> set {
>>
>> FLargeImages = value;
>>
>> Invalidate();
>>
>> }
>>
>> }
>> }
>>
>>
>>
>>
>>
>>

>
>



  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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off