<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/CustomDialog:close?action=history&amp;feed=atom</id>
	<title>CustomDialog:close - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/CustomDialog:close?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CustomDialog:close&amp;action=history"/>
	<updated>2026-04-08T01:21:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CustomDialog:close&amp;diff=57002&amp;oldid=prev</id>
		<title>AriosJentu: Created page with &quot;__NOTOC__ {{Client function}} This function execute event of closing Custom Dialog of Custom Window.  == Syntax == &lt;syntaxhighlight lang=&quot;lua&quot;&gt; nil CustomDialog:close() &lt;/synt...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CustomDialog:close&amp;diff=57002&amp;oldid=prev"/>
		<updated>2018-07-25T15:50:59Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__ {{Client function}} This function execute event of closing Custom Dialog of Custom Window.  == Syntax == &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; nil CustomDialog:close() &amp;lt;/synt...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function execute event of closing Custom Dialog of Custom Window.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
nil CustomDialog:close()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
This example just closes dialog when click on &amp;quot;OK&amp;quot; button:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local Window = CustomWindow.create(100, 100, 200, 150, &amp;quot;Example&amp;quot;)&lt;br /&gt;
local Button = CustomButton.create(50, 60, 100, 25, &amp;quot;Open Dialog&amp;quot;, false, Window)&lt;br /&gt;
&lt;br /&gt;
local Dialog = CustomDialog.create(150, &amp;quot;Dialog window&amp;quot;, {&amp;quot;OK&amp;quot;, &amp;quot;Cancel&amp;quot;}, Window)&lt;br /&gt;
&lt;br /&gt;
Window:setCloseEnabled(true)&lt;br /&gt;
&lt;br /&gt;
Button:addEvent(&amp;quot;onClientGUIClick&amp;quot;, function()&lt;br /&gt;
	Dialog:open()&lt;br /&gt;
end)&lt;br /&gt;
&lt;br /&gt;
Dialog:addEvent(&amp;quot;onCustomDialogClick&amp;quot;, function(button)&lt;br /&gt;
	if button == &amp;quot;OK&amp;quot; then&lt;br /&gt;
		Dialog:close()&lt;br /&gt;
	end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example of closing dialog is useless, because dialog closes automatically when user clicks button on dialog. This is just example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
{{CWSFUNCS}}&lt;/div&gt;</summary>
		<author><name>AriosJentu</name></author>
	</entry>
</feed>