G
graeme g
hi
my custom control doesn't seem to store data, i.e. when i change the
value in the designer, when i run it the value has gone back to the
default value.. here's is a code snippet
this class stores the information, it is referenced in 3 places in my
custom control
public class Sizes
{
private int width, height;
public int Width {get{return width;}set{width=value;}}
public int Height {get{return height;}set{height=value;}}
public Sizes(int width, int height)
{
this.width = width;
this.height = height;
}
}
and in my control this is the property and variable
private Sizes cellSize;
public Sizes CellSize {get{return cellSize;}set{cellSize = value;}}
and the constructor (which is where i think the problem lies) says
cellSize = new Sizes(30,30);
When i goto the designer and change the value of CellSize, the value is
there but after i compile and run it, the value is back to 30,30 and not
what i set in the designer....
what am i missing??? i only stored c# a lil while back i used to use
borland c++ builder - so you see where my problems lie...
thanks
graeme
my custom control doesn't seem to store data, i.e. when i change the
value in the designer, when i run it the value has gone back to the
default value.. here's is a code snippet
this class stores the information, it is referenced in 3 places in my
custom control
public class Sizes
{
private int width, height;
public int Width {get{return width;}set{width=value;}}
public int Height {get{return height;}set{height=value;}}
public Sizes(int width, int height)
{
this.width = width;
this.height = height;
}
}
and in my control this is the property and variable
private Sizes cellSize;
public Sizes CellSize {get{return cellSize;}set{cellSize = value;}}
and the constructor (which is where i think the problem lies) says
cellSize = new Sizes(30,30);
When i goto the designer and change the value of CellSize, the value is
there but after i compile and run it, the value is back to 30,30 and not
what i set in the designer....
what am i missing??? i only stored c# a lil while back i used to use
borland c++ builder - so you see where my problems lie...
thanks
graeme