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

Dynamic Property Array in Form Designer

I'm using C# 2.0. I have a UserControl-based class that contains a set
of controls that are TextBox-based. The number of controls defaults to
1, but it is a browsable property (NumFields) in the form designer and
can be changed.

I expose a FieldText property in the form designer without exposing the
TextBox-based class. I'm using an array of strings as the FieldText
property. However the FieldText property as displayed in form designer
'Properties' pane does not change as I change the NumFields property,
even though I change the underlying string array when the number of
fields changes.

Is there a way to trigger the 'Properties' pane in the form designer to
update a property when another property has changed?

By the way, I get a CA1819 warning because I'm exposing an array as a
property, but this is the only method that behaves the way I want in
the form designer. If there's a better way to expose an indexed
property, but still have it appear as a tree node in the 'Properties'
pane, please let me know.

Jun 16 '06 #1
1 2987
I figured it out. Just needed "[RefreshProperties(
RefreshProperties.All )]" for my NumFields property.

Jun 16 '06 #2

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

Similar topics

0
by: Anil0920 | last post by:
I have a very serious problem which really needs to be solved. We had a huge number of projects in 2002 that we recently converted to VS.NET 2003. The conversion was smooth and all is working well....
1
by: Leeor Geva | last post by:
Hey guys, how do I make a control PUBLIC inside the Web Form Designer Generated Code? What happens is that I make it public, i Run the solution, it works perfectly fine. Then for some reason...
1
by: johndow | last post by:
The project I am getting into is to provide a way to dynamically customize the layout of of a web form. For example, a survey page may contains many fields. We want to allow our customers to move...
11
by: PAul Maskens | last post by:
The form designer adds unnecessary code to the section when using a subclassed control. I've reproduced this in VS.NET 2002 and VS.NET 2003 so it's pretty fundamental. Outline steps: Create a...
1
by: Lee Newson | last post by:
Hi, I have a windows application with 2 forms. the app is finsihed apart from having to run a few "live" tests to see if there is anything left that need tweaking, however when i try to opent...
6
by: Arkadiusz Smolak | last post by:
Hi, I need a help. I have form inherited from other form. The base form implementation is placed in other assembly. I try to open my inherited form in designer but visual studio throws an...
1
by: =?Utf-8?B?RjVGNUY1?= | last post by:
I have created a control by inheriting ToolStripMenuItem that has an image property called LargeImage. ------ public class EventSubMenuItem : ToolStripMenuItem { private Image _largeImage =...
8
by: TomC | last post by:
I want to bypass the Windows Form Designer in VS, to create a form programmatically. The elements of the form are to be arranged in a table, and I want the size of the table (and therefore the...
2
by: prokopis | last post by:
am using c# for windows applications. am using dynamic linklayer array to print some labels in the form.i get some data from the database i add them in the linklabel array and i print it on the...
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: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
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...

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.