473,624 Members | 2,565 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DefaultValueAtt ribute

Hi,

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

[DefaultValueAtt ribute(nullptr)]

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

thx.

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

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

[System::Compone ntModel::Defaul tPropertyAttrib ute (nullptr)]
property Bitmap^ ImageSortAscend ant
{
Bitmap^ get()
{
return m_ImageSortA;
}
void set(System::Dra wing::Bitmap^ value)
{
m_ImageSortA = value;
}
}
#pragma endregion

but when i try to compile, i have the following error :
...\RAF_ListVie w.h(177) : error C3115:
'System::Compon entModel::Defau ltPropertyAttri bute': this attribute is
not allowed on 'RAF_ListView:: AR_ListView::Im ageSortAscendan t'

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 :

[DefaultValueAtt ribute(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 :

[DefaultValueAtt ribute(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.publi c.dotnet.framew ork.

-cd
Oct 26 '06 #3

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

Similar topics

0
834
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 you can always select the "Reset" option and restore the inherited property. However, if you extend an existing control class, say Button, and initialize some properties in the constructor and then use your own class in a form, the customizer...
3
1937
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;} set{}
0
3023
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 to an XML schema (xsd).
0
1365
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
4905
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 GradientColor {
2
7531
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
5053
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 /// </summary>
3
2755
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 my calling code and the webservice code are below. Thanks for your help. D:\Projects .NET\StoreBO\frmVoids.vb(182): Value of type '1-dimensional array of System.Data.SqlClient.SqlParameter' cannot be converted to '1-dimensional array of...
1
3167
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 "gotcha!". :***( I have a TypeConverter class that inherits from ArrayConverter and it parses a string into an integer-array. The property that gets/sets the array has the TypeConverter attribute assigned to this type-converter. One of the...
0
8179
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8493
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7176
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4187
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2613
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1797
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1493
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.