Re: [MSEide-MSEgui-talk] Fonts
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 Envoyé : vendredi 9 août 2019 22:09 À : mseide-msegui-talk@lists.sourceforge.net 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Fonts
Re-Hello, By the way do you have any guide about mse class because I want to know if there is a common ancestror between groupbox and grid ? I want to change the last proc OnMouseEv(..) to include groupbox . Regards Med De : mohamed hamza Envoyé : samedi 10 août 2019 11:20 À : General list for MSEide+MSEgui Objet : Re: [MSEide-MSEgui-talk] Fonts 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 Envoyé : vendredi 9 août 2019 22:09 À : mseide-msegui-talk@lists.sourceforge.net 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 mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk
Re: [MSEide-MSEgui-talk] Fonts
Hello Med. > Do you have a better idea ? No. > By the way do you have any guide about mse class Nor really, I just look inside mse code. For classes, it is in: /mseide-msegui/lib/common/kernel/mseclasses.pas But maybe some doc exists, I do not know. > because I want to know if there is a common ancestror between groupbox > and grid ? To know the ancestor, you may use mseide and, in code editor, click+ctrl on the object. Fre;D -- Sent from: http://mseide-msegui-talk.13964.n8.nabble.com/ ___ mseide-msegui-talk mailing list mseide-msegui-talk@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk