<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Listbox selection hacks	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/listbox-selection-hacks/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/listbox-selection-hacks?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=listbox-selection-hacks</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Tue, 19 Jul 2016 08:35:01 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.3</generator>
	<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/listbox-selection-hacks#comment-383489</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Tue, 19 Jul 2016 08:35:01 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6534#comment-383489</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/listbox-selection-hacks#comment-383422&quot;&gt;Radek&lt;/a&gt;.

@Radek - I think that the end-result would not be intuitive to users so I advise against doing this. 

If you still want to do it, then you could either update the underlying Java &lt;code&gt;SelectionModel&lt;/code&gt;, or do it programmatically in Matlab: you could use a similar callback function as the second one in my post, and use the Matlab &lt;i&gt;&lt;b&gt;union&lt;/b&gt;&lt;/i&gt; function to merge the previous selection values with the newly-selected value(s).]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/listbox-selection-hacks#comment-383422">Radek</a>.</p>
<p>@Radek &#8211; I think that the end-result would not be intuitive to users so I advise against doing this. </p>
<p>If you still want to do it, then you could either update the underlying Java <code>SelectionModel</code>, or do it programmatically in Matlab: you could use a similar callback function as the second one in my post, and use the Matlab <i><b>union</b></i> function to merge the previous selection values with the newly-selected value(s).</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Radek		</title>
		<link>https://undocumentedmatlab.com/articles/listbox-selection-hacks#comment-383422</link>

		<dc:creator><![CDATA[Radek]]></dc:creator>
		<pubDate>Mon, 18 Jul 2016 17:10:19 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6534#comment-383422</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/listbox-selection-hacks#comment-383223&quot;&gt;Yair Altman&lt;/a&gt;.

@Yair Altman - I meant I want to be able to click items on the list and each time a click new item it would be selected without clearing the others. So the user by default wouldn&#039;t need to hold Ctrl key.
I know in Java it is possible to override SelectionModel behavior, but in Matlab I don&#039;t know how.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/listbox-selection-hacks#comment-383223">Yair Altman</a>.</p>
<p>@Yair Altman &#8211; I meant I want to be able to click items on the list and each time a click new item it would be selected without clearing the others. So the user by default wouldn&#8217;t need to hold Ctrl key.<br />
I know in Java it is possible to override SelectionModel behavior, but in Matlab I don&#8217;t know how.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/listbox-selection-hacks#comment-383223</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sat, 16 Jul 2016 20:32:25 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6534#comment-383223</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/listbox-selection-hacks#comment-383044&quot;&gt;Radek&lt;/a&gt;.

@Radek - you are not making any sense. &quot;Simulate held Ctrl key&quot;? all you need to do is to set the &lt;b&gt;Value&lt;/b&gt; property to an array of indexes (e.g. [1,3,5,7]) and then the listbox selection will be updated appropriately.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/listbox-selection-hacks#comment-383044">Radek</a>.</p>
<p>@Radek &#8211; you are not making any sense. &#8220;Simulate held Ctrl key&#8221;? all you need to do is to set the <b>Value</b> property to an array of indexes (e.g. [1,3,5,7]) and then the listbox selection will be updated appropriately.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Radek		</title>
		<link>https://undocumentedmatlab.com/articles/listbox-selection-hacks#comment-383044</link>

		<dc:creator><![CDATA[Radek]]></dc:creator>
		<pubDate>Thu, 14 Jul 2016 21:27:01 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6534#comment-383044</guid>

					<description><![CDATA[I am trying to figure out how to simulate held Ctrl key in ListBox. 

I already tried using the callback and programatically add previous selection to new one, but this one works when mouse key is released, so everything goes empty and then selected back.
MousePressedCallback doesn&#039;t work well either because selection is performed after this event so my selection is overridden anyway.

I have a feeling something would need to be changed setSelectionModel]]></description>
			<content:encoded><![CDATA[<p>I am trying to figure out how to simulate held Ctrl key in ListBox. </p>
<p>I already tried using the callback and programatically add previous selection to new one, but this one works when mouse key is released, so everything goes empty and then selected back.<br />
MousePressedCallback doesn&#8217;t work well either because selection is performed after this event so my selection is overridden anyway.</p>
<p>I have a feeling something would need to be changed setSelectionModel</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
