473,383 Members | 1,872 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,383 software developers and data experts.

Winform property

I have a winform with a new property. The property type is UserControl.

This is my code fro the property:

private UserControl userControlDetalle;
public UserControl UserControlDetalle
{
get { return userControlDetalle; }
set {
userControlDetalle = value;
if (userControlDetalle != null)
{
...
}
}
}

I have a chield class from this form, and in the properties window I see the
new property, but I can't set a class derived from the UserControl class.

If I modify the property by code it works well.

¿any idea?

--
Saludos,

Alex Bibiano
++++++++++++++++++++++++++
Industrias Laubat, S.A.
Dpto. Informática
Nov 17 '05 #1
1 1734
Inherit a new class from ReferenceConvertor and override the IsValueAllowed
method to allow all objects of type UserControl or dereived from
UserControl. Then apply the class derived from ReferenceConvertor to the
property using the TypeConvertor attribute.

----------------
-Atul, Sky Software http://www.ssware.com
Shell MegaPack For .Net & ActiveX
Windows Explorer GUI Controls
&
Quick-Launch Like Appbars, MSN/Office2003 Style Popups,
System Tray Icons and Shortcuts/Internet Shortcuts
----------------
"Alex Bibiano" <ab******@newsgroups.nospam> wrote in message
news:1A**********************************@microsof t.com...
I have a winform with a new property. The property type is UserControl.

This is my code fro the property:

private UserControl userControlDetalle;
public UserControl UserControlDetalle
{
get { return userControlDetalle; }
set {
userControlDetalle = value;
if (userControlDetalle != null)
{
...
}
}
}

I have a chield class from this form, and in the properties window I see
the
new property, but I can't set a class derived from the UserControl class.

If I modify the property by code it works well.

¿any idea?

--
Saludos,

Alex Bibiano
++++++++++++++++++++++++++
Industrias Laubat, S.A.
Dpto. Informática

Nov 17 '05 #2

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

Similar topics

2
by: Wayne | last post by:
I have a winform that runs on its own, is it possible to wrap a stand-alone winform in a class? More accurately, is it possible to use a class to call an already established winform?
6
by: randy1200 | last post by:
I'm using Visual Studio 2005 and C#. I need to print a WinForm used for data entry as a graphic. In other words, I need to print the exact WinForm the user sees on the screen. I searched through...
6
by: WT | last post by:
Hello, Using VS2005. I have an assembly library that can be called from a Web site asp.net application or from a winform application. From this library I need to retrieve a path using simply a...
2
by: jyanmin.fang | last post by:
Hi, In my current project, I need to embed an .NET winform usercontrol in the aspx page (via <Objecttag). This winform usercontrol has an event called DoEvent (void DoEvent()). This winform...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.