<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/DgsWindowGetTextSize?action=history&amp;feed=atom</id>
	<title>DgsWindowGetTextSize - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/DgsWindowGetTextSize?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsWindowGetTextSize&amp;action=history"/>
	<updated>2026-05-14T07:22:36Z</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=DgsWindowGetTextSize&amp;diff=75648&amp;oldid=prev</id>
		<title>Thisdp: Created page with &quot;{{Client function}} __NOTOC__ This function retrieves the theoretical width and height (in pixels) of a certain piece of title text of dgs window.  ==Syntax==  &lt;syntaxhighlight lang=&quot;lua&quot;&gt; float, float dgsWindowGetTextSize( element theWindow ) &lt;/syntaxhighlight&gt;  ===Required Arguments===  *'''theWindow:''' The window of whose text you wish to retrieve the width and height.  ===Returns=== Returns two floats representing the width and height of the text in pixels.  ==Examp...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsWindowGetTextSize&amp;diff=75648&amp;oldid=prev"/>
		<updated>2022-11-03T14:00:47Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Client function}} __NOTOC__ This function retrieves the theoretical width and height (in pixels) of a certain piece of title text of dgs window.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; float, float dgsWindowGetTextSize( element theWindow ) &amp;lt;/syntaxhighlight&amp;gt;  ===Required Arguments===  *&amp;#039;&amp;#039;&amp;#039;theWindow:&amp;#039;&amp;#039;&amp;#039; The window of whose text you wish to retrieve the width and height.  ===Returns=== Returns two floats representing the width and height of the text in pixels.  ==Examp...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function retrieves the theoretical width and height (in pixels) of a certain piece of title text of dgs 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;
float, float dgsWindowGetTextSize( element theWindow )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theWindow:''' The window of whose text you wish to retrieve the width and height.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two floats representing the width and height of the text in pixels.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a text window, gets the title text width and height, and adjust the window width and title height according to the title text.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
&lt;br /&gt;
local myWindow = DGS:dgsCreateWindow ( 200, 200, 200, 200, &amp;quot;This a window with its title.\n This is the second line&amp;quot;, false )&lt;br /&gt;
DGS:dgsSetProperty(myWindow,&amp;quot;wordBreak&amp;quot;,true)&lt;br /&gt;
local width,height = DGS:dgsWindowGetTextSize( myWindow )&lt;br /&gt;
DGS:dgsSetSize ( myWindow, width, _, false )&lt;br /&gt;
DGS:dgsSetProperty ( myWindow, &amp;quot;titleHeight&amp;quot;, height )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Thisdp</name></author>
	</entry>
</feed>