<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.crumbledworld.com/index.php?action=history&amp;feed=atom&amp;title=ComboBoxExampleCode</id>
	<title>ComboBoxExampleCode - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.crumbledworld.com/index.php?action=history&amp;feed=atom&amp;title=ComboBoxExampleCode"/>
	<link rel="alternate" type="text/html" href="https://wiki.crumbledworld.com/index.php?title=ComboBoxExampleCode&amp;action=history"/>
	<updated>2026-04-22T01:51:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.4</generator>
	<entry>
		<id>https://wiki.crumbledworld.com/index.php?title=ComboBoxExampleCode&amp;diff=154&amp;oldid=prev</id>
		<title>Anders: Created page with &quot;==Example== &lt;syntaxhighlight lang=&quot;lua&quot;&gt;  function changeSetting(button) 	comboBox:setText(button:getTag()) end  comboBox = panel:add(ComboBox(PanelSize(size), items[1])) local items = {&quot;item1&quot;,&quot;item2&quot;,&quot;item3&quot;,&quot;item4&quot;}  for i=1, #items do 	local itemButton = comboBox:addItem( Button(PanelSize(Vec2(-1,0.03)), items[i]) ) 	itemButton:setTag(items[i]) 	itemButton:addEventCallbackExecute(changeSetting) end  &lt;/syntaxhighlight&gt;&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.crumbledworld.com/index.php?title=ComboBoxExampleCode&amp;diff=154&amp;oldid=prev"/>
		<updated>2025-07-06T07:59:13Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Example== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;  function changeSetting(button) 	comboBox:setText(button:getTag()) end  comboBox = panel:add(ComboBox(PanelSize(size), items[1])) local items = {&amp;quot;item1&amp;quot;,&amp;quot;item2&amp;quot;,&amp;quot;item3&amp;quot;,&amp;quot;item4&amp;quot;}  for i=1, #items do 	local itemButton = comboBox:addItem( Button(PanelSize(Vec2(-1,0.03)), items[i]) ) 	itemButton:setTag(items[i]) 	itemButton:addEventCallbackExecute(changeSetting) end  &amp;lt;/syntaxhighlight&amp;gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function changeSetting(button)&lt;br /&gt;
	comboBox:setText(button:getTag())&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
comboBox = panel:add(ComboBox(PanelSize(size), items[1]))&lt;br /&gt;
local items = {&amp;quot;item1&amp;quot;,&amp;quot;item2&amp;quot;,&amp;quot;item3&amp;quot;,&amp;quot;item4&amp;quot;}&lt;br /&gt;
&lt;br /&gt;
for i=1, #items do&lt;br /&gt;
	local itemButton = comboBox:addItem( Button(PanelSize(Vec2(-1,0.03)), items[i]) )&lt;br /&gt;
	itemButton:setTag(items[i])&lt;br /&gt;
	itemButton:addEventCallbackExecute(changeSetting)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Anders</name></author>
	</entry>
</feed>