Component Authoring
-
While creating a web component I ran into a problem with setting the properties for the Designer Property Pages. One of my Properties can only be Top,Bottom,Left, or Right. I want these in a listbox on the property pages. I have hunted for a way to do this, but I have been unable to find anything remotely close to the subject.
-
While creating a web component I ran into a problem with setting the properties for the Designer Property Pages. One of my Properties can only be Top,Bottom,Left, or Right. I want these in a listbox on the property pages. I have hunted for a way to do this, but I have been unable to find anything remotely close to the subject.
draco_iii wrote: I want these in a listbox on the property pages. I have hunted for a way to do this, but I have been unable to find anything remotely close to the subject. All you should have to do is make sure your property is defined as an Enum then the property grid will take it from there.
class MyClass
{
public enum Sides
{
Top, Bottom, Left, Right
}private Sides sides;
....
[Browsable(true)]
public Sides Sides
{
get
{
return sides;
}
set
{
sides = value;
}
}...
}Maybe I just didn't understand the question, because it sounds like you have something similar to this already. James "It is self repeating, of unknown pattern" Data - Star Trek: The Next Generation
-
draco_iii wrote: I want these in a listbox on the property pages. I have hunted for a way to do this, but I have been unable to find anything remotely close to the subject. All you should have to do is make sure your property is defined as an Enum then the property grid will take it from there.
class MyClass
{
public enum Sides
{
Top, Bottom, Left, Right
}private Sides sides;
....
[Browsable(true)]
public Sides Sides
{
get
{
return sides;
}
set
{
sides = value;
}
}...
}Maybe I just didn't understand the question, because it sounds like you have something similar to this already. James "It is self repeating, of unknown pattern" Data - Star Trek: The Next Generation