PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
ImageList collection in a control
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Framework Forms
ImageList collection in a control
![]() |
ImageList collection in a control |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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(); } } } |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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(); > > } > > } > } > > > > > > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
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(); >> >> } >> >> } >> } >> >> >> >> >> >> > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

