473,811 Members | 3,299 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ExpandableObjec tConverter::Get Properties override

Hello.

I'm facing the exact problem described here:
http://groups.google.com/groups?hl=p...ties%26meta%3D

I made a ExpandableObjec tConverter subclass but its GetProperties method is
not called when my object is set as a Converter of PropertyDescrip tor. The
thread above gives a good explanation of the problem, but the solution is
not described there!

Does anyone have an idea.

Bellow is the code of my derived class. If I try to use 'override' on
GetProperties declarations, the compiler says there's not a compatible
declaration on base class.

#pragma once

using namespace System;
using namespace System::Compone ntModel;
using namespace System::Collect ions;
using namespace System::Diagnos tics;

public ref class TExpandableProp erty : public ExpandableObjec tConverter
{
public:
TExpandableProp erty();

virtual PropertyDescrip torCollection^
GetProperties(I TypeDescriptorC ontext^, Object^, Attribute^ attributes)
{return GetProperties() ;}
virtual PropertyDescrip torCollection^ GetProperties(O bject^) {return
GetProperties() ;}
virtual PropertyDescrip torCollection^
GetProperties(I TypeDescriptorC ontext^, Object^) {return GetProperties() ;}
virtual PropertyDescrip torCollection^ GetProperties() ;

virtual bool GetPropertiesSu pported(ITypeDe scriptorContext ^) override
{return GetPropertiesSu pported();}
bool GetPropertiesSu pported() {return true;}

bool AddProperty(Pro pertyDescriptor ^propertyDescri ptor);

property bool ReverseProperti es {
void set(bool newValue){rever seProperties=ne wValue;}
}

protected:

private:
PropertyDescrip torCollection ^propertyCollec tion;
PropertyDescrip torCollection
^ReversePropert yDescriptorColl ection(Property DescriptorColle ction^
propertyDescrip torCollection);

bool reverseProperti es;
};

Thanks in advance for any help.

Regards,

Adriano Coser

AltoQi - Tecnologia Aplicada à Engenharia Adriano Coser Departamento de
Desenvolvimento Tel.: (48) 239-7000 ramal: 7069 e-mail: co***@altoqi.co m.br
website: www.altoqi.com.br
Nov 17 '05 #1
0 2207

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

Similar topics

1
4405
by: Polo | last post by:
Hi, I have a Custom ExpandableTypeConverter (that show the property of a object readonly) Some properties of this sub object have the Browsable(false) attribute but in the PropertyGrid these properties are showed. public class Test { //....
0
3045
by: Vladimir.Sakharuk | last post by:
I have created ExpandableObjectConverter in C#. for use in System.Windows.Forms.PropertyGrid. The property grid shows the DiffItem is a object that holds member TheItem. without expanding TheItem It works if u click, select from drop down box. until you DoubleClick it shows error: "Invalid property Value". with "Object type cannot be converted to target type."
0
1108
by: Adriano Coser | last post by:
Hello. I have an ExpandableObjectConverter subclass that I associate to the 'Converter' of a custom property descriptor. After I changed my .net code to the new syntax (VC 2005), the GetProperties method of my converter class is not called anymore by the PropertyGrid. Now my expandable properties always show a property 'Length' with value 0.
2
4060
by: Adriano Coser | last post by:
Hello. After I converted my .net code to the new VC2005 syntax I started to get C4490 on my ExpandableObjectConverter subclass overrides. The GetProperties method is no longer called by the PropertyGrid when I use my subclass as a type converter. Can anyone tell me what has changed? What's the correct way to override GetProperties method? Here's the code for my class:
3
1941
by: Sky Sigal | last post by:
I coming unglued... really need some help. 3 days chasing my tail all over MSDN's documentation ...and I'm getting nowhere. I have a problem with TypeConverters and storage of expandableobjects to attributes in tags (think Style tag -> Style object). The problem that I am chasing is: Html side:
0
1282
by: Nebelung | last post by:
Hi! I've written a custom ExpandableObjectConverter in which I have overridden GetPropertiesSupported and GetProperties (and some more). By setting breakpoints in all methods I have found out that only GetProperties never gets called, however all other methods are called correctly. (The respective class has the TypeConverter attribute set.) Does anyone have a clue about what this situation might cause?
0
1947
by: Nebelung | last post by:
Hi! I've written a custom ExpandableObjectConverter in which I have overridden GetPropertiesSupported and GetProperties (and some more). The class to which this TypeConverter is applied has all properties public and should be accessed via PropertyGrid. Now I noticed that all overridden methods are called correctly (i.e. even GetPropertiesSupported, which returns true) except for GetProperties, which is never called (checked by...
0
1324
by: Nebelung | last post by:
In a custom ExpandableObjectConverter I have overridden GetPropertiesSupported (always returns true) and GetProperties. The class to which this TypeConverter is applied has only public properties and it should be accessed via a PropertyGrid. However, GetProperties is never called! By overriding some more methods and setting breakpoints inside those overrides I have found out that all overrides are being called correctly, except for the...
3
3475
by: =?Utf-8?B?R3JlZyBDbGFyaw==?= | last post by:
I have an object which I present to the user through a propertyGrid. With many of the properties (many of which are objects themselves) I have implemented my own TypeConverters; many of these inherit from the ExpandableObjectConverter so that child properties are available to the user. That all works swell. Now I'm trying to create a print engine that will be able to print all properties (Browsable). I thought this was going to be...
0
9734
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10652
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10137
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
9211
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...
0
5561
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
5700
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4346
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
2
3874
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3026
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.