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

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 1264
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********@noemailnospam.com> wrote in message
news:#f**************@tk2msftngp13.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
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: ...
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?
7
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...
19
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...
5
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...
0
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...
15
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...
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: 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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
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...

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.