473,395 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

DefaultValueAttribute

Hi,

I would like to define the default value of my property.
My property is from type Bitmap^, therefore i was thinking to do :

[DefaultValueAttribute(nullptr)]

but i does not work.
how is it possible to define this property to no pointer ?

thx.

ALain
Oct 24 '06 #1
2 1631
here is my code :

#pragma region public Property : ImageSortAscendant
// Allow user to select the image which will be displayed for column
sorted ascendantly

[System::ComponentModel::DefaultPropertyAttribute (nullptr)]
property Bitmap^ ImageSortAscendant
{
Bitmap^ get()
{
return m_ImageSortA;
}
void set(System::Drawing::Bitmap^ value)
{
m_ImageSortA = value;
}
}
#pragma endregion

but when i try to compile, i have the following error :
...\RAF_ListView.h(177) : error C3115:
'System::ComponentModel::DefaultPropertyAttribute' : this attribute is
not allowed on 'RAF_ListView::AR_ListView::ImageSortAscendant'

how could it be possible ?
thanks,

Al.
--== Alain ==-- wrote:
Hi,

I would like to define the default value of my property.
My property is from type Bitmap^, therefore i was thinking to do :

[DefaultValueAttribute(nullptr)]

but i does not work.
how is it possible to define this property to no pointer ?

thx.

ALain
Oct 25 '06 #2
--== Alain ==-- wrote:
Hi,

I would like to define the default value of my property.
My property is from type Bitmap^, therefore i was thinking to do :

[DefaultValueAttribute(nullptr)]

but i does not work.
how is it possible to define this property to no pointer ?
Please don't multipost.

Already answered in microsoft.public.dotnet.framework.

-cd
Oct 26 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gianluca | last post by:
Properties of inherited controls have the default value set to the value that is assigned in the InitializeComponent method in the base form class. Which is correct and useful. In the derived form...
3
by: Homa | last post by:
I've create a custom DataGridColumnStyle and when I try to assign a DefaultValue to a property, it doesn't seems to have any effect. Here is the code: public int Test { get{return 0;}...
0
by: keith bannister via .NET 247 | last post by:
(Type your message here) -------------------------------- From: keith bannister Hi, I'm new to .net (as of last week) but here goes. I want to serialize/deserialize a file the conforms...
0
by: vthakur | last post by:
Hello: I have generated a c# proxy (client) from the WSDL. One of the class has a defaultValueAtribute. Like so: public class PersonInformationLoadRequest { public string DataSource;
1
by: Dulovits M. | last post by:
I want a default value for this color property ( with System.ComponentModel.DefaultValue ) but it doesnt work .. any hints or ideas what ive done wrong ?? public System.Drawing.Color...
2
by: Zoury | last post by:
Hey guys! :O) i'd like to know how would one set a default color property to a system color ? as you might guess, this code doesn't work ... //*** public void MyProp {
2
by: Mike in Paradise | last post by:
Can you use the DefaultValueAttribute on Decimal PropertyFields? If so what is format for setting the Default value. Thanks... Example /// <summary> /// Field: increment value ///...
3
by: Stacey Levine | last post by:
I have a webservice that has the below procedure. Basically a procedure to called a stored procedure and return the results. When I try to call the webservice from my program I get the error. Both...
1
by: Mythran | last post by:
How can I set a DefaultValue for an array property? I don't have a project that uses this anymore, but still am curious. Of all the replies I've posted here, a simple thing like this is my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.