Nice explanation. Thank you very much.
On Sat, Mar 30, 2024 at 4:20 PM Marc Weustink via lazarus < lazarus@lists.lazarus-ide.org> wrote: > The onenter is indeed fired when the control gets focus. However if you > show a dialog in that event, the control loses focus and gets it again when > the dialog is closed, resulting in a loop. > In general it is bad coding to have much logic in onenter/onleave events > > I once was confronted with an app which checked if you didn't leave an > empty mandatory edit. If so, the app set the focus back to the control you > left. But if you navigated to the next empty mandatory edit it ran into an > endless loop focussing both edits > > Marc > > On March 30, 2024 1:50:14 PM GMT+01:00, "Arí Ricardo Ody via lazarus" < > lazarus@lists.lazarus-ide.org> wrote: > >I was thinking that OnEnter would refer to receiving focus. If it responds > >to mouse movement then it is explained. > > > >I changed the logic to use the OnClick event in the component. Then it > >worked. > > > >I see now that it was a lack of knowledge on my part. > > > >Thank you very much. > > > >On Fri, Mar 29, 2024 at 9:03 AM Werner Pamler via lazarus < > >lazarus@lists.lazarus-ide.org> wrote: > > > >> Am 29.03.2024 um 12:09 schrieb Arí Ricardo Ody via lazarus: > >> > procedure TfrmGeraString.tedtNomArqMicEnter(Sender: TObject); > >> The "Enter" in this method name indicates that you assigned the event > >> handler to the OnEnter event of something (a button maybe). This means > >> that whenever the mouse is moved over this button ("enter") the event > >> fires. Usuall dialogs are displayed only when a "click" occurs, and this > >> responsibility is in the OnClick event of the button. > >> -- > >> _______________________________________________ > >> lazarus mailing list > >> lazarus@lists.lazarus-ide.org > >> https://lists.lazarus-ide.org/listinfo/lazarus > >> > -- > _______________________________________________ > lazarus mailing list > lazarus@lists.lazarus-ide.org > https://lists.lazarus-ide.org/listinfo/lazarus >
-- _______________________________________________ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus