473,698 Members | 2,398 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accessing controls that are attached to a tray control

I am creating a non-visible/tray control that monitors other custom controls
for changes (among other things). One of the monitored controls is a new
textbox that adds functionality to the standard textbox, and includes a
variable that points to the monitoring tray control... it works just like
the imagelist that is attached to any control that supports imagelists, such
as a treeview or listview. Everything is working the way I would like at
this point -- Custom event handling, reading/writing properties, etc.

Now I would like to iterate through the list of controls attached to the
tray control. Using the imagelist as an example, I want to loop through a
collection of all the controls that are attached to (are using) a certain
imagelist.

I haven't found a way to do this using the tray control object. One thing
that I considered was iterating through the form's controls and checking for
the tray control property, but this seems like a slow and undesirable
solution.

Is there a better way to efficiently access the controls attached to a tray
control in the way that I am describing?

Thank you,
Robert
Nov 20 '05 #1
2 1284
Hi,

Not really sure what you are trying to do. Take a look at extenders.

http://msdn.microsoft.com/library/de...erprovider.asp

Ken
------------------

"Robert Kemp" <ro********@noe mailnospam.com> wrote in message
news:#f******** ******@tk2msftn gp13.phx.gbl:
I am creating a non-visible/tray control that monitors other custom
controls
for changes (among other things). One of the monitored controls is a new

textbox that adds functionality to the standard textbox, and includes a
variable that points to the monitoring tray control... it works just like

the imagelist that is attached to any control that supports imagelists,
such
as a treeview or listview. Everything is working the way I would like at

this point -- Custom event handling, reading/writing properties, etc.

Now I would like to iterate through the list of controls attached to the

tray control. Using the imagelist as an example, I want to loop through a

collection of all the controls that are attached to (are using) a certain

imagelist.

I haven't found a way to do this using the tray control object. One thing

that I considered was iterating through the form's controls and checking
for
the tray control property, but this seems like a slow and undesirable
solution.

Is there a better way to efficiently access the controls attached to a
tray
control in the way that I am describing?

Thank you,
Robert


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.0 - Release Date: 6/12/2004
Nov 20 '05 #2
I looked at the extender provider pages, but don't know how to work that
into my program...

A single imagelist can be used by one or more controls. For example, I
have an imagelist named ilsMain in the tray of my programs main form. I
also have two treeviews tvwMain and tvwSub each using the ilsMain
imagelist. Is there any way that I can access ilsMain to determine that
tvwMain and tvwSub are using that imagelist?

=============

More in depth information about what I am really doing...
I am using the imagelist as an example here, but what I have done is
created my own custom tray control (just like the imagelist) that is
used by a bunch of custom textboxes. I want to get a list of textbox
controls via a loop through the tray control.

I have a "monitor" control named monMain. I also have 20 textboxes that
have a property that points to the monMain control. I would like to
loop through something in the monMain control that will allow me to
access the 20 textboxes controls. I am creating these custom controls
to minimize coding of repetitive tasks for the textboxes, while using a
handful of global properties available in the monMain control.

Robert
Ken Tucker [MVP] wrote:
Hi,

Not really sure what you are trying to do. Take a look at extenders.

http://msdn.microsoft.com/library/de...erprovider.asp

Ken

Nov 20 '05 #3

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

Similar topics

2
1439
by: rt | last post by:
Hello, I'm looking for a commerical (supported) .NET serial control with source (just in case) and have found the following and was wondering if anyone has had experience with any of them: http://www.sax.net/dotnet/communications/ http://www.winsoft.sk/ncomport.htm http://www.mycomponentsoftware.com http://www.scientificcomponent.com
4
1483
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?
7
4511
by: Rab | last post by:
hi i need to programmatically change the caption of a label that is linked to another control (i.e. textbox, combobox). it's for a generic function where i only know the textbox/combobox name but not the name of the label that is linked to the textbox/combobox. example sub: public sub ReSetCaption()
19
6720
by: trint | last post by:
Ok, I start my thread job: Thread t = new Thread(new ThreadStart(invoicePrintingLongRunningCodeThread)); t.IsBackground = true; t.Start(); There are lots of calls to controls and many happen in function calls from invoicePrintingLongRunningCodeThread. I need just an example in
5
1513
by: Dan Nash | last post by:
Hi all, I've got a page with a user control on, added via VS. I'm trying to get to a property of the user control (or more precisely, a public var). Here's the code at the top of my aspx page... <%@ Register TagPrefix="dI2" TagName="dartsUC_rolodexsearch" Src="dartsUC_rolodexsearch.ascx" %>
0
1177
by: Hawk | last post by:
Hello, this is my first post hope to get some good answers. I am using asp.net 2.0 and I am trying to pass the value entered in the formview textbox in insert mode "in this case it is the default mode" to a label or hidden field outside of the formview when the insert button is pushed. Is there a way to do this? The App I am creating using many interrelated tables by forgiegn keys and in this case I need to insert a record in one...
15
6512
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt accept other controls. The control i drag drop on it becomes the child of my custom control's parent form and not the child of my custom control. Then i added this line "" before my custom control class (i dont know what this line does). Now
7
2129
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. The number of controls that are displayed can be adjusted by the user so the controls are added to the page dynamically using the following code in the Page_Init event handler: For i as Integer = 1 to NumberOfControls
3
1568
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 controls, so I use the following statement to access them: Me.Page.FindControl(ControlID) However, this is returning Nothing, even though the control can be accessed in the Load event of the Page containing the control and the validator. I also...
0
9166
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8899
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7737
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6525
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2333
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.