473,320 Members | 1,744 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,320 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 1454
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
1
by: Shćllîpôpď 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.