<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/DgsButtonGetTextSize?action=history&amp;feed=atom</id>
	<title>DgsButtonGetTextSize - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/DgsButtonGetTextSize?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsButtonGetTextSize&amp;action=history"/>
	<updated>2026-04-06T05:52:10Z</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=DgsButtonGetTextSize&amp;diff=75643&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 text of dgs button.  ==Syntax==  &lt;syntaxhighlight lang=&quot;lua&quot;&gt; float, float dgsButtonGetTextSize( element theButton ) &lt;/syntaxhighlight&gt;  ===Required Arguments===  *'''theButton:''' The button 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.  ==Example==...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsButtonGetTextSize&amp;diff=75643&amp;oldid=prev"/>
		<updated>2022-11-03T13:50:35Z</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 text of dgs button.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; float, float dgsButtonGetTextSize( element theButton ) &amp;lt;/syntaxhighlight&amp;gt;  ===Required Arguments===  *&amp;#039;&amp;#039;&amp;#039;theButton:&amp;#039;&amp;#039;&amp;#039; The button 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.  ==Example==...&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 text of dgs button.&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 dgsButtonGetTextSize( element theButton )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theButton:''' The button 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 button, gets the text width and height, and creates a background for the button.&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 myButton = DGS:dgsCreateButton ( 200, 200, 100, 100, &amp;quot;OK. This is a dgs button of which you want to get the text width and height&amp;quot;, false )&lt;br /&gt;
DGS:dgsSetProperty(myButton,&amp;quot;wordBreak&amp;quot;,true)&lt;br /&gt;
local width,height = DGS:dgsButtonGetTextSize( myButton )&lt;br /&gt;
local background = DGS:dgsCreateImage(200, 200, width, height, _, false, _, tocolor(0,0,0,100))&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>