<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/DgsComboBoxSetItemFont?action=history&amp;feed=atom</id>
	<title>DgsComboBoxSetItemFont - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/DgsComboBoxSetItemFont?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsComboBoxSetItemFont&amp;action=history"/>
	<updated>2026-05-18T16:54:16Z</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=DgsComboBoxSetItemFont&amp;diff=72918&amp;oldid=prev</id>
		<title>Tracer: Created page with &quot;{{Client function}} __NOTOC__ This function changes the font of a dgs combobox item.  ==Syntax==  &lt;syntaxhighlight lang=&quot;lua&quot;&gt; bool dgsComboBoxSetItemFont ( element comboBox,...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsComboBoxSetItemFont&amp;diff=72918&amp;oldid=prev"/>
		<updated>2021-10-14T17:53:10Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Client function}} __NOTOC__ This function changes the font of a dgs combobox item.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool dgsComboBoxSetItemFont ( element comboBox,...&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 changes the font of a dgs combobox item.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dgsComboBoxSetItemFont ( element comboBox, int itemId, mixed font )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''comboBox:''' The dgs combobox containing the item you're interested in&lt;br /&gt;
*'''itemId:''' The index of the item&lt;br /&gt;
*'''font:''' Either a custom dx font element or the name of a built-in dx font (see here [[Standard_DGS_Font_Names]])&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the text was set successfully, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This changes the font of the selected item using command ''setFont''. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
loadstring(exports.dgs:dgsImportFunction())()&lt;br /&gt;
&lt;br /&gt;
local comboBox = dgsCreateComboBox(200,200,100,30,&amp;quot;test&amp;quot;,false)&lt;br /&gt;
for i=1,5 do&lt;br /&gt;
    dgsComboBoxAddItem(comboBox,i)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler('setFont',function(cmd, text)&lt;br /&gt;
    local item = dgsComboBoxGetSelectedItem(comboBox)&lt;br /&gt;
    if item ~= -1 then&lt;br /&gt;
        dgsComboBoxSetItemFont(comboBox, item, 'clear')&lt;br /&gt;
    end&lt;br /&gt;
end)&lt;br /&gt;
&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>Tracer</name></author>
	</entry>
</feed>