Hi egirardi,
I kind of suspected that was the case, that you wanted some internal controls of the UserControl to be the actual targets.
There are zillion ways to make this work. One of them might be to add a function to your UserControl, and have that function or readonly property return an array of Component of the internal controls that you do want to serve as dragtargets inside the UserControl. Let's say you have a UserControl with a TextBox1 and Button1 that you want for this purpose. Your C# readonly property might then look like this:
public Gizmox.WebGUI.Forms.Component[] getInternalDragTargets
{
get
{
Gizmox.WebGUI.Forms.Component[] objTargets =
new Gizmox.WebGUI.Forms.Component[]
{ this.button1,
this.textBox1 };
// Make sure all the internal controls allow drop
foreach (Gizmox.WebGUI.Forms.Component ctrl in objTargets) {
((Control) ctrl).AllowDrop = true ;
}
// You also must make sure the internal controls do have a registered
// DragDrop event handler and they know what to do with "their" drops.
return objTargets;
}
}
Then in your ListBox, you need to set ListBox1.DragTargets = UserControl1.getInternalDragTargets and you should have this working as expected.
Hope this helps,
Palli