Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
GeneralRe: Passing Properties as paramaters Pin
Diego Mijelshon12-Feb-03 2:46
Diego Mijelshon12-Feb-03 2:46 
GeneralRe: Passing Properties as paramaters Pin
leppie12-Feb-03 7:13
leppie12-Feb-03 7:13 
GeneralProblem with a Very Large Bitmap Pin
Mohammad Siahatgar12-Feb-03 2:07
Mohammad Siahatgar12-Feb-03 2:07 
GeneralRe: Problem with a Very Large Bitmap Pin
leppie12-Feb-03 7:52
leppie12-Feb-03 7:52 
GeneralRe: Problem with a Very Large Bitmap Pin
Mohammad Siahatgar14-Feb-03 0:43
Mohammad Siahatgar14-Feb-03 0:43 
GeneralRe: Problem with a Very Large Bitmap Pin
Danny2814-Feb-03 2:55
Danny2814-Feb-03 2:55 
GeneralControl in C# Pin
Member 1697711-Feb-03 22:57
Member 1697711-Feb-03 22:57 
GeneralRe: Control in C# Pin
Nnamdi Onyeyiri12-Feb-03 5:32
Nnamdi Onyeyiri12-Feb-03 5:32 
first of all, vs.net needs the class to have properties otherwise the designer cannot edit it, so the class you have there should look like this.
public class CellInfo
{
   private Rectangle m_bounds;
   private Color m_clr;
   private int m_data;
 
   public Rectangle Bounds
   {
      get { return this.m_bounds; }
      set { this.m_bounds = value; }
   }
 
   public Color Color
   {
      get { return this.m_clr; }
      set { this.m_clr = value; }
   }
 
   public int Data
   {
      get { return this.m_data; }
      set { this.m_data = value; }
   }
}

I also think that if you want the designer to design the objects, you cant use ArrayList, but have to use a strongly typed collection, which for CellInfo would be:
public class CellInfoCollection : System.Collections.CollectionBase
{
   public CellInfo this[int index]
   {
      get { return (CellInfo)this.List[index]; }
      set { this.List[index] = value; }
   }
 
   public CellInfoCollection()
   {
   }
 
   public void Add(CellInfo info)
   {
      this.List.Add(info);
   }
}
All you need to do is change the CellInfo to any other object type to have it work with that type of object.

Ummm....if you want the designer to work properly with your collections, the property that gives access to the collection needs to have the following attribute:

[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]<br />
public CellInfoCollection Cells<br />
{<br />
   get { return this.m_cells; }<br />
}


Making sure you have the using statement for the System.ComponentModel namespace.

just FYI, if you really want to add proper design-time support, take a look at the System.Windows.Forms.Design.ControlDesigner class Smile | :)

Hope that helps.

1001111111011101111100111100101011110011110100101110010011010010
Sonork | 100.21142 | TheEclypse


GeneralRe: Control in C# Pin
Member 1697712-Feb-03 22:33
Member 1697712-Feb-03 22:33 
GeneralRe: Control in C# Pin
Nnamdi Onyeyiri13-Feb-03 4:57
Nnamdi Onyeyiri13-Feb-03 4:57 
GeneralBorder style of combo box Pin
chito11-Feb-03 22:10
chito11-Feb-03 22:10 
GeneralRe: Border style of combo box Pin
Furty12-Feb-03 18:52
Furty12-Feb-03 18:52 
QuestionControl Library, .net BUG ? Pin
Braulio Dez11-Feb-03 22:04
Braulio Dez11-Feb-03 22:04 
Generaltest desktop bob Pin
caoxiongkun11-Feb-03 21:10
caoxiongkun11-Feb-03 21:10 
GeneralCOM+! Pin
sss_dr11-Feb-03 20:45
sss_dr11-Feb-03 20:45 
QuestionHow to print the content of richtextbox control... Pin
zhoujun11-Feb-03 20:35
zhoujun11-Feb-03 20:35 
AnswerRe: How to print the content of richtextbox control... Pin
Furty11-Feb-03 21:57
Furty11-Feb-03 21:57 
GeneralPlease introduce me some samplecodes or tutorialls about... Pin
zhoujun11-Feb-03 20:21
zhoujun11-Feb-03 20:21 
GeneralRe: Please introduce me some samplecodes or tutorialls about... Pin
567890123412-Feb-03 3:02
567890123412-Feb-03 3:02 
QuestionCan crystal reports in visual studio .net... Pin
zhoujun11-Feb-03 20:14
zhoujun11-Feb-03 20:14 
Generalwhats a easy way to change the color of Specific word in rtf field Pin
jtmtv1811-Feb-03 19:18
jtmtv1811-Feb-03 19:18 
QuestionHow to pass values to crystal reports viewer's parameterfield? Pin
zhoujun11-Feb-03 16:17
zhoujun11-Feb-03 16:17 
GeneralRe: Implementing Carlos Perez's C# Enhanced Progress Bar Control Pin
leppie11-Feb-03 9:52
leppie11-Feb-03 9:52 
GeneralRe: Implementing Carlos Perez's C# Enhanced Progress Bar Control Pin
Ray Cassick11-Feb-03 10:03
Ray Cassick11-Feb-03 10:03 
GeneralTabControl Pin
monrobot1311-Feb-03 9:41
monrobot1311-Feb-03 9:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.