Add shown event to Form class

This commit is contained in:
haru-s 2024-06-29 21:36:26 +09:00
parent 19e9bbd6e8
commit 17156ca25c

View file

@ -2118,6 +2118,7 @@ class Form: ContainerControl, IDialogResult // docmain
} }
show(); show();
onShown(EventArgs.empty);
wmodal = true; wmodal = true;
for(;;) for(;;)
@ -2204,6 +2205,8 @@ class Form: ContainerControl, IDialogResult // docmain
Event!(Form, CancelEventArgs) closing; /// Event!(Form, CancelEventArgs) closing; ///
//EventHandler load; //EventHandler load;
Event!(Form, EventArgs) load; /// Event!(Form, EventArgs) load; ///
//EventHandler shown;
Event!(Form, EventArgs) shown; ///
/// ///
@ -2248,9 +2251,19 @@ class Form: ContainerControl, IDialogResult // docmain
if(!hwfocus || !IsChild(hwnd, hwfocus)) if(!hwfocus || !IsChild(hwnd, hwfocus))
_selectNextControl(this, null, true, true, true, false); _selectNextControl(this, null, true, true, true, false);
} }
if (isHandleCreated)
onShown(EventArgs.empty);
} }
///
protected void onShown(EventArgs ea)
{
shown(this, ea);
}
private void _init() private void _init()
{ {
_recalcClientSize(); _recalcClientSize();