Posted: Thu May 19, 2016 3:08 pm Post subject: Difference between form.hide() and form.close()?
What is the difference between the two functions? After executing CreateForm() and form.close() too many times in Lua Engine, I get Error:C stack overflow while form.hide() does not?
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
Posted: Thu May 19, 2016 6:21 pm Post subject:
form.close() will execute (if defined) OnClose event.
If you create a form manually, define OnClose properly:
Code:
local myForm = createForm(false)
myForm.Caption = 'title'
...
...
...
myForm.OnClose = function (sender)
return caFree
end
Quote:
Closing a form can have several meanings:
caNone: do nothing (don't close)
caHide: hide the form (default for modal forms)
caFree: destroy the form
caMinimize: minimize the form (MDI child default)
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum