PC Review


Reply
Thread Tools Rate Thread

Cascading events down to child controls

 
 
Scott McChesney
Guest
Posts: n/a
 
      5th May 2004
I'm writing a Windows application for a client, and I've run into a problem
I don't know how to solve.

The UI is relatively simple - a listbox on the left (in a panel), and a
third-party tab control on the right (also in a panel). The usual splitter
bar, and all that good stuff. The tab control is set up to deal with
drag/drop events, so that users can drag an item from the listbox over the
tab control and have the tab control respond by either switching to the
appropriate tab page (if it's already created), or create a new one based on
the data dragged. The "guts" of the tab pages are in a single UserControl
that has all the functionality I need, and I create and add those
UserControls on the fly.

My problem is that, while I can easily set up the tab control to process the
drag/drop events, setting up the UserControl is not so easy. This
UserControl has several constituent controls, and since I'm adding the
control on the fly, I have to hook up the appropriate events on the fly as
well. But once a user drags the cursor over one of the constituent
controls, my on-the-fly-wired event doesn't see it, and the cursor changes
to the "you can't drop here" version.

How do I cascade the AddHandler wiring down to every constituent control in
the UserControl? I know that cascading events down the chain is technically
the wrong way, but I don't see how to set it up so that everything moves up.
What am I missing here?

TIA

- Scott


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strategies for controlling cascading events for interdependent controls on a form? Joergen Bech Microsoft VB .NET 4 19th Jun 2007 07:24 PM
Linked Textbox Controls on Form - Avoiding Cascading Change Events =?Utf-8?B?Qmx1ZSBBYXJkdmFyaw==?= Microsoft Excel Programming 1 15th Mar 2007 10:09 PM
Firing events for child controls in a DataGrid =?Utf-8?B?Z2xlbm4=?= Microsoft ASP .NET 2 19th Jul 2006 04:00 PM
Getting events from child AxHost derived controls alex.scordellis@gmail.com Microsoft Dot NET Framework Forms 0 19th May 2006 02:36 PM
Events in DataGrid's child controls? szabelin Microsoft ASP .NET 0 29th Jul 2003 02:36 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:26 AM.