TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Karthik Agarwal
NA
748
266.5k
Can anyone explain what does this code mean?
Oct 27 2011 5:12 AM
[Description ("Foreground color"), Category ("Text Configuration")]
property Color DrawColor
{
Color get()
{
return draw_color;
}
void set( Color val )
{
draw_color = val;
}
}
and also the below code and what's the difference between the above and below code?
[Description ("Alignment to be used for this text"), Category ("Text Configuration")]
[TypeConverter(AlignModeList::typeid)]
property String ^ Alignment
{
String ^ get()
{
return alignment;
}
void set( String ^ val )
{
alignment = val;
}
}
public ref class AlignModeList : System::ComponentModel::StringConverter
{
public:
static array<String ^> ^ alignmode = gcnew array<String ^>(3){"Left", "Centre", "Right"};
virtual System::ComponentModel::TypeConverter::StandardValuesCollection ^ GetStandardValues(System::ComponentModel::ITypeDescriptorContext ^ context) override
{
return gcnew StandardValuesCollection(alignmode);
}
virtual bool GetStandardValuesSupported(System::ComponentModel::ITypeDescriptorContext ^ context) override
{
return true;
}
virtual bool GetStandardValuesExclusive(System::ComponentModel::ITypeDescriptorContext ^ context) override
{
return true;
}
};
Reply
Answers (
17
)
How to avoid compilation error when .c file is included in the vc++ project??
How to write code based on the typedef?