<div dir="ltr"><div>I think that we aren't talking about the same thing.</div><div><br></div><div>I think that a transparent control must retain clicks to another controls if it is uppermost and in front of these controls. I think that this is correct.</div><div><br></div><div>Polyline is a different control. The area of line is the area of the control, other area will be full transparent and must pass the events to controls behind. If you click on line, the click must be fired on Polyline object, otherwise, it must be fired on the first control behind of polyline.</div><div><br></div><div>The bug here is: I have two TImages and one polyline. The uppermost is TImage is positioned in a removed area (transparent) of polyline and the other TImage is the background. When I click on uppermost TImage click isn't fired on it nor on background TImage. It's fired on TForm! The same behavior happens if polyline is the uppermost control. </div><div><br></div><div>Using SetShape make the "click" ignore TImages and TSpeedButtons (in front or behind) positioned in a removed area of a Shaped control.</div><div><br></div><div>Since the click messages are processed on parent, I made the message redirection. Now I'm studing a way to check if the click is on a control area or not, to make a TControl.CMHitTest fix.</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-11-22 7:57 GMT-02:00 Frederic Da Vitoria <span dir="ltr"><<a href="mailto:davitofrg@gmail.com" target="_blank">davitofrg@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I may be wrong, but this seems different from the problem you are describing: in the bugtracker issue, the click triggers the Form handler instead of being sent to a Control. In your problem, from your description, I thought the click triggered the polyline control while you would have wanted it to be handled by the TImage which is behind the polyline. In a way, your problem is not enough transparency (in terms of who gets to handle the click event) while the bugtracker bug is too much transparency. Or did I misunderstand you?<div><div class="h5"><br><div><br><div class="gmail_extra"><div class="gmail_quote">2014-11-22 10:01 GMT+01:00 Fabio Luis Girardi <span dir="ltr"><<a href="mailto:fluisgirardi@gmail.com" target="_blank">fluisgirardi@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Here is it: <a href="http://bugs.freepascal.org/view.php?id=20381" target="_blank">http://bugs.freepascal.org/view.php?id=20381</a></div><div class="gmail_extra"><br><div class="gmail_quote">2014-11-21 22:24 GMT-02:00 Fabio Luis Girardi <span dir="ltr"><<a href="mailto:fluisgirardi@gmail.com" target="_blank">fluisgirardi@gmail.com</a>></span>:<div><div><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I found this bug on bug tracker. I followed your idea and send a patch that solves this. I'll try another approach tomorrow.</p>
<p dir="ltr">Thank you very much!</p>
<div class="gmail_quote">Em 21/11/2014 20:48, "Frederic Da Vitoria" <<a href="mailto:davitofrg@gmail.com" target="_blank">davitofrg@gmail.com</a>> escreveu:<div><div><br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014-11-21 16:01 GMT+01:00 Frederic Da Vitoria <span dir="ltr"><<a href="mailto:davitofrg@gmail.com" target="_blank">davitofrg@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><span><div class="gmail_quote">2014-11-20 19:21 GMT+01:00 Fabio Luis Girardi <span dir="ltr"><<a href="mailto:fluisgirardi@gmail.com" target="_blank">fluisgirardi@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>I don't know if this is a bug or not. I created a control from a TCustomControl that draws a polyline with a transparent background. The transparent effect has been using SetShape procedure using a bitmap of 1 bit color depth. </div><div><br></div><div>The "bug" (I don't know if this is a bug) is that a TImage behind of a instance of my polyline control don't receive the click messages, but a TButton instance receives.</div><div><br></div><div>So, I don't know if this is a bug or I have to do something in my control to send these messages to TImage behind.</div></div></div></blockquote></div><br></span>I had once a similar issue with a tPanel behind another control, in Delphi. IIRC, I indeed had to forward the messages in some way to the tPanel. I can check in my archives, if you want, but I won't be able to do it before tomorrow.<span><font color="#888888"><br clear="all"></font></span></div></div>
</blockquote></div><br></div><div class="gmail_extra">I just checked. Sorry, my memory was wrong, I did use TButtons. But it makes sense that the uppermost control would prevent any deeper control from receiving clicks, even if the uppermost control is visually transparent.<br clear="all"></div></div>
</blockquote></div></div></div>
</blockquote></div></div></div><span></span></div></blockquote></div><br>-- <br><div>Frederic Da Vitoria<br>(davitof)<br><br>Membre de l'April - « promouvoir et défendre le logiciel libre » - <a href="http://www.april.org" target="_blank">http://www.april.org</a><br></div>
</div></div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">The best regards,<br><br>Fabio Luis Girardi<br>PascalSCADA Project<br><a href="http://sourceforge.net/projects/pascalscada" target="_blank">http://sourceforge.net/projects/pascalscada</a><br><a href="http://www.pascalscada.com" target="_blank">http://www.pascalscada.com</a></div>
</div>