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

Properties for dynamicly created controls within a user control

Hi!

I've created a UI control that adds(Creates) or subtracts(Destroys) standard buttons on a panel. I want to have each of these created buttons become accessible as UI elements, just as the custom control itself is, so that if the control has been defined by property to have 2 buttons, then the buttons themselves have standard properties accessible to the user of the control, so things like color, etc... as well as events can be tied specifically to each of these dynaimcally created child controls. Any suggestions?

This is much like a Tabbed Dialog control, where when you add a tab, all the properties and methods available are there for each tab you add.

Chris Monro
chris_monro@yahoo.com
Jun 1 '07 #1
2 1126
Their is a Page.Comtrol property where you can go throuh all the controls of the page and modifying them...
Jun 1 '07 #2
Their is a Page.Comtrol property where you can go throuh all the controls of the page and modifying them...
I guess what I was asking about wasn't clear. When you use a standard MS "Tab Control", the moment you drop it onto your form, it creates the tab control, and 2 tab pages. Both the control, and the two tab pages are created as independant, addressable objects in the UI, and in code... the "Tabs" property of the "Tab Control" displays "(Collection") as the property value, with the elipsis (...) button, and opens a dialog that lets you set the properties of each of the tab pages, as well as add and remove them.

That's what I want to accomplish with my control. It's a panel, that has a variable number of buttons, which should each be addressable. SO I have a property called "Buttons" which I want to show (Collection) as the value, and then open the dialog allowing add/remove/edit of each button.
Jun 1 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Henke | last post by:
Hi! I add some web user controls dynamicly with: myPanel.Controls.Add(Page.LoadControl("MyDynamiclyAddedPage.ascx")); the style of the controls on the user control is set from a css-class, by...
3
by: Mikip | last post by:
Hi, I have some properties that are common to all pages so I have created a base class which every page inherits from. I now also want to use these properties within User Controls on the page....
2
by: Brian | last post by:
NOTE ALSO POSTED IN microsoft.public.dotnet.framework.aspnet.buildingcontrols I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the...
1
by: Henke | last post by:
Hi I have a aspx-page with a panel-control. On this panel control I add user controls dynamicly with LoadControl and panel.Controls.Add(myControl). On some of the dynamicly added user controls I...
2
by: Vivek Sharma | last post by:
Hi There, I have a situation where I wish to load the controls dynamically on the basis of user role. Hence, I am using this code. if (UserRole == "IS Administrator") { Control UC1 =...
2
by: Wayne Sepega | last post by:
I have the following Code: foreach (MyClass d in myClassCollection) { curRadioBtn = new RadioButton(); curRadioBtn.Text = d.ToString(); curRadioBtn.GroupName = "Contact"; curRadioBtn.ID =...
6
by: | last post by:
I have made some user controls with custom properties. I can set those properties on instances of my user controls, and I have programmed my user control to do useful visual things in response to...
1
by: =?Utf-8?B?Q2hyaXN0aWFuIFdlaW5lcnQ=?= | last post by:
Hello, I currently fight with a problem during the derivative of WinForm controls. In Visual Studio I created a new User Control. This control is derived from the DataGridView of the...
11
by: Web Search Store | last post by:
Hello, I set up a web page with 2 user controls. In classic asp, the first one did all the declarations, and the second one used the values, and could reset it. In ASP.Net so far I can't...
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
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: 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:
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...
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
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...
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.