473,396 Members | 2,158 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,396 software developers and data experts.

ExpandableObjectConverter::GetProperties override

Hello.

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

I made a ExpandableObjectConverter subclass but its GetProperties method is
not called when my object is set as a Converter of PropertyDescriptor. 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::ComponentModel;
using namespace System::Collections;
using namespace System::Diagnostics;

public ref class TExpandableProperty : public ExpandableObjectConverter
{
public:
TExpandableProperty();

virtual PropertyDescriptorCollection^
GetProperties(ITypeDescriptorContext^, Object^, Attribute^ attributes)
{return GetProperties();}
virtual PropertyDescriptorCollection^ GetProperties(Object^) {return
GetProperties();}
virtual PropertyDescriptorCollection^
GetProperties(ITypeDescriptorContext^, Object^) {return GetProperties();}
virtual PropertyDescriptorCollection^ GetProperties();

virtual bool GetPropertiesSupported(ITypeDescriptorContext^) override
{return GetPropertiesSupported();}
bool GetPropertiesSupported() {return true;}

bool AddProperty(PropertyDescriptor ^propertyDescriptor);

property bool ReverseProperties {
void set(bool newValue){reverseProperties=newValue;}
}

protected:

private:
PropertyDescriptorCollection ^propertyCollection;
PropertyDescriptorCollection
^ReversePropertyDescriptorCollection(PropertyDescr iptorCollection^
propertyDescriptorCollection);

bool reverseProperties;
};

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.com.br
website: www.altoqi.com.br
Nov 17 '05 #1
0 2187

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

Similar topics

1
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...
0
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...
0
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...
2
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...
3
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...
0
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...
0
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...
0
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...
3
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...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...

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.