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

Accessing controls on the ComponentTray

It seems that controls that are in a form's ComponentTray (e.g. ToolTip,
ErrorProvider) don't appear on its list of controls (FormName.Controls). Is
there any way I can get hold of them?

Jul 21 '05 #1
4 1463
Hi,

"Controls" in component tray are components :). Try with components variable
that is in your form class (private System.ComponentModel.IContainer
components).

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"Duncan" <Du****@discussions.microsoft.com> je napisal v sporočilo
news:59**********************************@microsof t.com ...
It seems that controls that are in a form's ComponentTray (e.g. ToolTip,
ErrorProvider) don't appear on its list of controls (FormName.Controls).
Is
there any way I can get hold of them?

Jul 21 '05 #2
Thanks for the advice, Peter, but I'm not too sure how I should go about
this. To get the controls, I would use:

For Each c as Control in myForm.Controls

What would I use to get at these components?

Thanks,

--
Duncan

"Peter Jausovec" wrote:
Hi,

"Controls" in component tray are components :). Try with components variable
that is in your form class (private System.ComponentModel.IContainer
components).

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)

Jul 21 '05 #3
You can use components.Components to get ComponentCollection and you can go
through each component.

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)
"Duncan" <Du****@discussions.microsoft.com> je napisal v sporočilo
news:A5**********************************@microsof t.com ...
Thanks for the advice, Peter, but I'm not too sure how I should go about
this. To get the controls, I would use:

For Each c as Control in myForm.Controls

What would I use to get at these components?

Thanks,

--
Duncan

"Peter Jausovec" wrote:
Hi,

"Controls" in component tray are components :). Try with components
variable
that is in your form class (private System.ComponentModel.IContainer
components).

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)

Jul 21 '05 #4
Thanks, Peter - that seems to do it.

I'd found another way (using reflection), but this seems simpler.

Thanks again,

--
Duncan

"Peter Jausovec" wrote:
You can use components.Components to get ComponentCollection and you can go
through each component.

--
Regards,
Peter Jausovec
(http://blog.jausovec.net)

Jul 21 '05 #5

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

Similar topics

1
by: Paul Maidment | last post by:
Hi, I am a bit green when it comes to .net development so please excuse me if this question is obvious or has been asked before... I am trying to programmatically access a label control...
5
by: Jonathan Williams | last post by:
Hi, I have an object which inherits from WebControl (CUSTOM : WebControl) In this object I have code in which I add child contols: protected override void CreateChildControls() {...
1
by: CS Wong | last post by:
Hi, I have a page form where form elements are created dynamically using Javascript instead of programatically at the code-behind level. I have problems accessing the dynamically-created...
6
by: arvee | last post by:
Is there a way to access controls (and their properties) in a user control? The Web Form Designer marks controls as 'Protected' which makes them inaccessable from the host form. If I mark them as...
4
by: Duncan | last post by:
It seems that controls that are in a form's ComponentTray (e.g. ToolTip, ErrorProvider) don't appear on its list of controls (FormName.Controls). Is there any way I can get hold of them?
4
by: raj_genius | last post by:
I hav two queries, whc are as follows: FIRSTLY: is it possible to access the controls(by name) of a parent form(MDI) from its child forms??if yes then how??plzz provide a coded example in VB if...
3
by: Jeff | last post by:
Hey asp.net 2.0 In the source I posted below, there is a GridView (look at the bottom of the script): <asp:GridView ID="gvwOnline" runat="server"> </asp:GridView> I'm trying to assign a...
7
by: =?Utf-8?B?Li46OiBLZXZpbiA6Oi4u?= | last post by:
I have a problem with accessing controls that I have loaded dynamically and added to a web page. The scenario: I have a webpage that displays multiple instances of a user control on the page. ...
3
by: Nathan Sokalski | last post by:
I have a validator that I wrote by inheriting from BaseValidator. At certain points in the code, I need to access other controls on the page containing the validator. I have the IDs 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: 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
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...
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...
0
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...

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.