Hi Fred,

   As you suggested to work with onMouseEvent instead of changing Msegui lib we 
can write alo:

procedure tmainfo.onmouseev(const sender: twidget; var ainfo: mouseeventinfoty);
var i:integer;

begin
if ainfo.eventkind = ek_buttonpress then
for i := 0 to childrencount-1 do
if       (children[i] is twidgetgrid) then
with twidgetgrid(children[i]) do
   if (ainfo.pos.x >= bounds_x)
   and (ainfo.pos.x <= bounds_x + bounds_cx-1)
   and (ainfo.pos.y >= bounds_y)
   and (ainfo.pos.y <= bounds_y + bounds_cy-1)
  then
begin
setfocus();
exit
end;

end;

Do you have a better idea ?

Regards



Med


________________________________
De : fredvs <[email protected]>
Envoyé : vendredi 9 août 2019 22:09
À : [email protected] 
<[email protected]>
Objet : Re: [MSEide-MSEgui-talk] Fonts

> PS: Not tested.

This one yes! (replace in demo onmouseev with this):

procedure tmainfo.onmouseev(const sender: twidget; var ainfo:
mouseeventinfoty);
var
i : integer;
begin
if ainfo.eventkind = ek_clientmouseenter then
begin

for i := 0 to ChildrenCount - 1 do
  if  (children[i] is  twidgetgrid) and (ainfo.pos.x >=
twidgetgrid(children[i]).left)
   and (ainfo.pos.x <= twidgetgrid(children[i]).left +
twidgetgrid(children[i]).width)
   and (ainfo.pos.y >= twidgetgrid(children[i]).top)
   and (ainfo.pos.y <= twidgetgrid(children[i]).top + theheight)
 then
  begin
  twidgetgrid(children[i]).setfocus();
  exit;
  end;

end;

Fre;D



--
Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/


_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to