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

Home Posts Topics Members FAQ

VC 2005 Beta 2: ExpandableObjec tConverter::Get Properties

Hello.

I have an ExpandableObjec tConverter 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.

Another thing: if I try to declare the GetProperties functions as
'override' the compiler says that there isn't a compatible version in
the base class. But, according to the documentation, the declarations
are right.

Does anyone have an idea of what's wrong?

Thanks in advance for any help.

Adriano Coser.

The header of my expandable converter:

#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();

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

PropertyDescrip torCollection^ GetProperties(O bject^) { return
GetProperties() ; }

PropertyDescrip torCollection^
GetProperties(I TypeDescriptorC ontext^, Object^) { return
GetProperties() ; }

PropertyDescrip torCollection^ GetProperties() { return
propertyCollect ion; }

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

bool GetPropertiesSu pported() { return true; }

bool AddProperty(Pro pertyDescriptor ^propertyDescri ptor);

private:
PropertyDescrip torCollection ^propertyCollec tion;
};
Nov 17 '05 #1
0 1108

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

Similar topics

0
2208
by: Adriano Coser | last post by:
Hello. I'm facing the exact problem described here: http://groups.google.com/groups?hl=pt&lr=&threadm=%23cs%24KWF%24BHA.2200%40tkmsftngp02&rnum=1&prev=/groups%3Fhl%3Dpt%26lr%3D%26q%3DTypeConverter%253A%253AGetProperties%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...
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:
5
6545
by: Lance | last post by:
I want to expose properties of a class to a user via a PropertyGrid class. Some of the properties are of type System.IO.FileInfo. Ideally, an OpenFileDialog window would appear when the user attempted to edit the value of the System.IO.FileInfo properties. Is there an existing UITypeEditor that will do this type of thing, or will I need to create my own Thanks Lance
6
2047
by: ljlevend2 | last post by:
I need to create TypeConverters for the floating type drawing structures (i.e., PointF, SizeF and RectangleF) that behave exactly as their integer couterparts (e.g., System.Drawing.PointConverter). I am able to create TypeConverters with basic functionality by inheriting from System.ComponentModel.ExpandableObjectConverter and overriding CanConvertTo, CanConvertFrom, ConvertTo and ConvertFrom. But, the integer converts also implement the...
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
9607
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
10397
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10410
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10138
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...
1
7674
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
5700
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4353
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
3878
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.