Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-03

Custom login forms and modal results

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mark Morgan Lloyd

If a custom login form (e.g. specifying a host and port for telnet) is displayed, and the OK/Cancel buttons have modal results, what is the procedure that set the form visible supposed to do pending getting the form's modalResult? Once the form is set invisible, does it have to clear modalResult back to mrNone, or is this done automatically?

Put another way, is the original procedure supposed to spin pending the modal result appearing, or is it supposed to return with subsequent processing attached to one of the login form's event handlers (and if so which one)?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mattias Gaertner
to Mark Morgan Lloyd
Show quoted text 5 lines
If a custom login form (e.g. specifying a host and port for telnet) is displayed, and the OK/Cancel buttons have modal results, what is the procedure that set the form visible supposed to do pending getting the form's modalResult? Once the form is set invisible, does it have to clear modalResult back to mrNone, or is this done automatically?

A form is shown modal with Form1.ShowModal and that resets the ModalResult to mrNone.

Put another way, is the original procedure supposed to spin pending the modal result appearing, or is it supposed to return with subsequent processing attached to one of the login form's event handlers (and if so which one)?

Mattias

Reply by email

Mark Morgan Lloyd
to Mattias Gaertner
Mattias Gaertner wrote 11 lines
On Fri, 30 Mar 2012 15:33:08 +0000 Mark Morgan Lloyd wrote: > If a custom login form (e.g. specifying a host and port for telnet) is > displayed, and the OK/Cancel buttons have modal results, what is the > procedure that set the form visible supposed to do pending getting the > form's modalResult? Once the form is set invisible, does it have to > clear modalResult back to mrNone, or is this done automatically? A form is shown modal with Form1.ShowModal and that resets the ModalResult to mrNone.

Thanks, got it.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email