> 
> I'm currently implementing a Proxy class that allows to automatically
> delegate events from one object to another one. But the result is not
> beautiful. I must think about all that...

I finally dropped my "Proxy" class, finding no way to implement it correctly.

Instead, I created a "Proxy" property in the Control class. When a control has 
a proxy, it will raise all mouse and keyboard events of its proxy for itself 
(the proxy keeps its own events). Moreover, SetFocus() and HasFocus() on the 
control will actually act on the proxy.

For example, in the ValueBox user control, the inner TextBox is set as its 
proxy. That way, all keyboard events of the TextBox are catched as if the 
ValueBox has raised them.

-- 
Benoît Minisini

------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to