<?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: Customizing listbox &#038; editbox scrollbars	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=customizing-listbox-editbox-scrollbars</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Fri, 10 Jun 2022 07:24:28 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-514212</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Fri, 10 Jun 2022 07:24:28 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=994#comment-514212</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-514209&quot;&gt;dani&lt;/a&gt;.

Dani - You can use &lt;code&gt;jViewport.setViewPosition(java.awt.Point(0,0))&lt;/code&gt; as I showed in earlier comments here]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-514209">dani</a>.</p>
<p>Dani &#8211; You can use <code>jViewport.setViewPosition(java.awt.Point(0,0))</code> as I showed in earlier comments here</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: dani		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-514209</link>

		<dc:creator><![CDATA[dani]]></dc:creator>
		<pubDate>Thu, 09 Jun 2022 11:54:07 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=994#comment-514209</guid>

					<description><![CDATA[hi!! how i can set the horizontal scrollbar to the leftside when appearing! now it set to right side of text]]></description>
			<content:encoded><![CDATA[<p>hi!! how i can set the horizontal scrollbar to the leftside when appearing! now it set to right side of text</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-512144</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sun, 07 Nov 2021 10:20:22 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=994#comment-512144</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-512076&quot;&gt;Peter&lt;/a&gt;.

@Peter - you can modify the scrollbars by accessing them directly. For example:
&lt;pre lang=&quot;matlab&quot;&gt;
% Create a multi-line (Max&gt;1) editbox uicontrol
hEditbox = uicontrol(&#039;style&#039;,&#039;edit&#039;, &#039;max&#039;,5, ...);
% Get the Java scroll-pane container reference
jScrollPane = findjobj(hEditbox);
% Update the scrollbar handles
jSize = java.awt.Dimension(40,40);
jScrollPane.getHorizontalScrollBar.setPreferredSize(jSize);
jScrollPane.getVerticalScrollBar.setPreferredSize(jSize);
% Repaint the scrollpane on-screen
jScrollPane.revalidate
&lt;/pre&gt;

A more advanced solution could be to &lt;a href=&quot;http://undocumentedmatlab.com/articles/modifying-matlab-look-and-feel&quot;&gt;modify Matlab&#039;s default Look-&amp;-Feel&lt;/a&gt; (&lt;code&gt;javax.swing.UIManager.put(&#039;ScrollBar.width&#039;,40);&lt;/code&gt;) so that all scrollbars created from now on (in the current Matlab session) will have a width of 40 pixels.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-512076">Peter</a>.</p>
<p>@Peter &#8211; you can modify the scrollbars by accessing them directly. For example:</p>
<pre lang="matlab">
% Create a multi-line (Max>1) editbox uicontrol
hEditbox = uicontrol('style','edit', 'max',5, ...);
% Get the Java scroll-pane container reference
jScrollPane = findjobj(hEditbox);
% Update the scrollbar handles
jSize = java.awt.Dimension(40,40);
jScrollPane.getHorizontalScrollBar.setPreferredSize(jSize);
jScrollPane.getVerticalScrollBar.setPreferredSize(jSize);
% Repaint the scrollpane on-screen
jScrollPane.revalidate
</pre>
<p>A more advanced solution could be to <a href="http://undocumentedmatlab.com/articles/modifying-matlab-look-and-feel">modify Matlab&#8217;s default Look-&#038;-Feel</a> (<code>javax.swing.UIManager.put('ScrollBar.width',40);</code>) so that all scrollbars created from now on (in the current Matlab session) will have a width of 40 pixels.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Peter		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-512076</link>

		<dc:creator><![CDATA[Peter]]></dc:creator>
		<pubDate>Tue, 02 Nov 2021 12:10:17 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=994#comment-512076</guid>

					<description><![CDATA[Hello Mr. Atlmann,
is it possible to change the width of the scrollbar? I use my app on a touch display and its hard to impossible to hit the scrollbar with the finger, so i would like to change the width of the scrollbar. If thats not possible, what other solutions would there be?
Thanks, Peter.]]></description>
			<content:encoded><![CDATA[<p>Hello Mr. Atlmann,<br />
is it possible to change the width of the scrollbar? I use my app on a touch display and its hard to impossible to hit the scrollbar with the finger, so i would like to change the width of the scrollbar. If thats not possible, what other solutions would there be?<br />
Thanks, Peter.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Xiangrui Li		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-405429</link>

		<dc:creator><![CDATA[Xiangrui Li]]></dc:creator>
		<pubDate>Wed, 26 Apr 2017 15:51:14 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=994#comment-405429</guid>

					<description><![CDATA[This seems related to the post at http://undocumentedmatlab.com/blog/handling-red-java-console-errors]]></description>
			<content:encoded><![CDATA[<p>This seems related to the post at <a href="http://undocumentedmatlab.com/blog/handling-red-java-console-errors" rel="ugc">http://undocumentedmatlab.com/blog/handling-red-java-console-errors</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Andres Roid		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-405418</link>

		<dc:creator><![CDATA[Andres Roid]]></dc:creator>
		<pubDate>Wed, 26 Apr 2017 14:06:37 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=994#comment-405418</guid>

					<description><![CDATA[Hi,

I&#039;m trying scroll to a specific position in a GUI table. But when I load the value an exception appears.

I do this, it&#039;s okay?

&lt;pre lang=&quot;matlab&quot;&gt;
jTable = findjobj(handles.ranking); %% Ranking is a GUI table
jScrollPane = jTable.getComponent(0);
scrollPos = jScrollPane.getViewPosition;
set(jScrollPane,&#039;ViewPosition&#039;,[0,69]); %% for exaple, x = 0, y = 69 position.
&lt;/pre&gt;


The error is this,

&lt;pre lang=&quot;matlab&quot;&gt;
Exception in thread &quot;AWT-EventQueue-0&quot; java.util.ConcurrentModificationException
	at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
	at java.util.AbstractList$Itr.next(Unknown Source)
	at com.jidesoft.grid.CellStyleTable.configureRendererComponent(Unknown Source)
	at com.jidesoft.grid.CellStyleTable.prepareRenderer(Unknown Source)
	at com.jidesoft.grid.CellSpanTable.prepareRenderer(Unknown Source)
	at com.jidesoft.grid.PropertyTable.prepareRenderer(Unknown Source)
	at com.mathworks.mlwidgets.inspector.JidePropertyViewTable.prepareRenderer(JidePropertyViewTable.java:90)
	at com.jidesoft.plaf.basic.BasicJideTableUI.paintCell(Unknown Source)
	at com.jidesoft.plaf.basic.BasicCellSpanTableUI.c(Unknown Source)
	at com.jidesoft.plaf.basic.BasicCellSpanTableUI.paint(Unknown Source)
	at javax.swing.plaf.ComponentUI.update(Unknown Source)
	at javax.swing.JComponent.paintComponent(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintToOffscreen(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
	at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
	at javax.swing.RepaintManager.paint(Unknown Source)
	at javax.swing.JComponent._paintImmediately(Unknown Source)
	at javax.swing.JComponent.paintImmediately(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
	at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
&lt;/pre&gt;

I am using Matlab 2009a]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>I&#8217;m trying scroll to a specific position in a GUI table. But when I load the value an exception appears.</p>
<p>I do this, it&#8217;s okay?</p>
<pre lang="matlab">
jTable = findjobj(handles.ranking); %% Ranking is a GUI table
jScrollPane = jTable.getComponent(0);
scrollPos = jScrollPane.getViewPosition;
set(jScrollPane,'ViewPosition',[0,69]); %% for exaple, x = 0, y = 69 position.
</pre>
<p>The error is this,</p>
<pre lang="matlab">
Exception in thread "AWT-EventQueue-0" java.util.ConcurrentModificationException
	at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
	at java.util.AbstractList$Itr.next(Unknown Source)
	at com.jidesoft.grid.CellStyleTable.configureRendererComponent(Unknown Source)
	at com.jidesoft.grid.CellStyleTable.prepareRenderer(Unknown Source)
	at com.jidesoft.grid.CellSpanTable.prepareRenderer(Unknown Source)
	at com.jidesoft.grid.PropertyTable.prepareRenderer(Unknown Source)
	at com.mathworks.mlwidgets.inspector.JidePropertyViewTable.prepareRenderer(JidePropertyViewTable.java:90)
	at com.jidesoft.plaf.basic.BasicJideTableUI.paintCell(Unknown Source)
	at com.jidesoft.plaf.basic.BasicCellSpanTableUI.c(Unknown Source)
	at com.jidesoft.plaf.basic.BasicCellSpanTableUI.paint(Unknown Source)
	at javax.swing.plaf.ComponentUI.update(Unknown Source)
	at javax.swing.JComponent.paintComponent(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintToOffscreen(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
	at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
	at javax.swing.RepaintManager.paint(Unknown Source)
	at javax.swing.JComponent._paintImmediately(Unknown Source)
	at javax.swing.JComponent.paintImmediately(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
	at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
</pre>
<p>I am using Matlab 2009a</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-341619</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 17 Dec 2014 12:55:01 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=994#comment-341619</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-341618&quot;&gt;Peter Borda&lt;/a&gt;.

By using findjobj and the table&#039;s setValueAt() method. The specifics depend on your Matlab release. Read my &lt;a href=&quot;http://undocumentedmatlab.com/blog/uitable-customization-report&quot; rel=&quot;nofollow&quot;&gt;uitable customization report&lt;/a&gt; or section 4.1 in my &lt;a href=&quot;http://undocumentedmatlab.com/books/matlab-java&quot; rel=&quot;nofollow&quot;&gt;Matlab-Java programming book&lt;/a&gt; for details.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-341618">Peter Borda</a>.</p>
<p>By using findjobj and the table&#8217;s setValueAt() method. The specifics depend on your Matlab release. Read my <a href="http://undocumentedmatlab.com/blog/uitable-customization-report" rel="nofollow">uitable customization report</a> or section 4.1 in my <a href="http://undocumentedmatlab.com/books/matlab-java" rel="nofollow">Matlab-Java programming book</a> for details.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Peter Borda		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-341618</link>

		<dc:creator><![CDATA[Peter Borda]]></dc:creator>
		<pubDate>Wed, 17 Dec 2014 12:49:27 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=994#comment-341618</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-178453&quot;&gt;Ben Kirollos&lt;/a&gt;.

&quot;By updating the cell at the Java level rather than updating the uitable’s Data property&quot;

How do you do that?]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-178453">Ben Kirollos</a>.</p>
<p>&#8220;By updating the cell at the Java level rather than updating the uitable’s Data property&#8221;</p>
<p>How do you do that?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Christian Beuschel		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-338927</link>

		<dc:creator><![CDATA[Christian Beuschel]]></dc:creator>
		<pubDate>Wed, 26 Nov 2014 17:02:39 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=994#comment-338927</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-338785&quot;&gt;Christian Beuschel&lt;/a&gt;.

I guess that my manipulation of the rowHeader by attaching a textarea, destroys everything. :( Before manipulation my object has Wrapping off. After manipulation there is no Wrapping anymore, neither on or off.. it&#039;s like it&#039;s an another object]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-338785">Christian Beuschel</a>.</p>
<p>I guess that my manipulation of the rowHeader by attaching a textarea, destroys everything. 🙁 Before manipulation my object has Wrapping off. After manipulation there is no Wrapping anymore, neither on or off.. it&#8217;s like it&#8217;s an another object</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Christian Beuschel		</title>
		<link>https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-338918</link>

		<dc:creator><![CDATA[Christian Beuschel]]></dc:creator>
		<pubDate>Wed, 26 Nov 2014 15:54:46 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=994#comment-338918</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-338785&quot;&gt;Christian Beuschel&lt;/a&gt;.

Hello,
unfortunately it&#039;s not true. I just tried by opening my programm directly with smaller figure width. I did not resize it after. The text is immediately wrapped :-/ I think that setWrapping doesn&#039;t work as it should.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/customizing-listbox-editbox-scrollbars#comment-338785">Christian Beuschel</a>.</p>
<p>Hello,<br />
unfortunately it&#8217;s not true. I just tried by opening my programm directly with smaller figure width. I did not resize it after. The text is immediately wrapped :-/ I think that setWrapping doesn&#8217;t work as it should.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
