<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SPEED VI &#187; Movement</title>
	<atom:link href="http://www.speedvi.com/tag/movement/feed" rel="self" type="application/rss+xml" />
	<link>http://www.speedvi.com</link>
	<description>Everything about Virtual Instruments, Computer-based Measurement and Control, Automation...</description>
	<lastBuildDate>Thu, 28 Jan 2010 14:54:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Move Up and Down Tree Control Sub-items Programmatically in LabVIEW</title>
		<link>http://www.speedvi.com/everything-labview-related/move-up-and-down-tree-control-sub-items-programmatically-in-labview.html</link>
		<comments>http://www.speedvi.com/everything-labview-related/move-up-and-down-tree-control-sub-items-programmatically-in-labview.html#comments</comments>
		<pubDate>Fri, 10 Jul 2009 05:55:35 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[LabVIEW]]></category>
		<category><![CDATA[Items]]></category>
		<category><![CDATA[Movement]]></category>
		<category><![CDATA[Tree Control]]></category>

		<guid isPermaLink="false">http://www.speedvi.com/everything-labview-related/move-up-and-down-tree-control-sub-items-programmatically-in-labview.html</guid>
		<description><![CDATA[In my current project, I’m using a tree control to store the test items and the test operations are taken in sequence following the tree control’s top to down order. To make the test more flexible, the test sequence(here is the tree control’s items order in this program) should be able to modified by the [...]]]></description>
			<content:encoded><![CDATA[<p>In my current project, I’m using a tree control to store the test items and the test operations are taken in sequence following the tree control’s top to down order. To make the test more flexible, the test sequence(here is the tree control’s items order in this program) should be able to modified by the user. The user should be able to move test item up and down in this test sequence tree control. </p>
<p>LabVIEW provides the basic tree item move VIs, but in the actual test project, there is more to be considered and much more work to do. In my project, I use a two level tree to store the test sequence, the top level is the test item’s category and the sub-level is the test items as the following picture.</p>
<p> <span id="more-54"></span>
<p><img style="border-bottom: 0px; border-left: 0px; display: block; float: none; margin-left: auto; border-top: 0px; margin-right: auto; border-right: 0px" title="image" border="0" alt="image" src="http://www.speedvi.com/wp-content/uploads/2009/07/image.png" width="196" height="186" /> </p>
<p>Move test items up or down in this tree control must always keep the test items under the right category. In my program, when move a test item up or down, first check if the item is the top(for up) or bottom(for down) item, if true, no operation will be taken; then check if the item is the top(for up) or bottom(for down)item in it’s category(for clearance name it A), if false, just move the item up or down in it’s category(A), if true, create a new category(B) with the same category text before or after current category(A) and move the item to this category(B), and if the category(C) before or next to it&#160; have more than one items, a new category(D) should be created after(for up) or before(for down) the category(B) the moved item under, and then move the last item(for up) or the first item(for down) to this category(D), and if the before or next category(C) has only one item, just move the newly created category(B) before or after the neighbor category. And if there is a category(E) before or after the neighbor category(C), check if the category(E) text is the same with the newly created category(B), if the same, the newly created category(B) should be merged into that category(E). It’s quite complex to explain it.</p>
<p>I just attached the VIs I created in this project, you can have much better understanding by it:<a href="http://www.speedvi.com/VISamples/MoveTreeItemUpDown.zip" target="_blank">Move Tree Item Up and Down VIs</a>.</p>
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li>April 20, 2009 -- <a href="http://www.speedvi.com/everything-labview-related/transfer-more-than-text-message-in-queue-between-loops-in-labview.html" title="Transfer More Than Text Message in Queue Between Loops in LabVIEW">Transfer More Than Text Message in Queue Between Loops in LabVIEW</a> (2)</li><li>March 16, 2009 -- <a href="http://www.speedvi.com/everything-labview-related/how-to-create-linked-list-in-labview.html" title="How to Create Linked List in LabVIEW">How to Create Linked List in LabVIEW</a> (0)</li><li>March 8, 2009 -- <a href="http://www.speedvi.com/everything-labview-related/a-note-about-using-database-connectivity-toolset-in-labview.html" title="A Note about Using Database Connectivity Toolset in LabVIEW">A Note about Using Database Connectivity Toolset in LabVIEW</a> (0)</li><li>February 22, 2009 -- <a href="http://www.speedvi.com/everything-labview-related/build-a-tri-state-led-indicator-in-labview.html" title="Build a Tri-State LED Indicator in LabVIEW">Build a Tri-State LED Indicator in LabVIEW</a> (0)</li><li>February 16, 2009 -- <a href="http://www.speedvi.com/everything-labview-related/ni-announcing-the-labview-2009-platform-beta-program.html" title="NI Announcing the LabVIEW 2009 Platform Beta Program">NI Announcing the LabVIEW 2009 Platform Beta Program</a> (0)</li><li>February 2, 2009 -- <a href="http://www.speedvi.com/everything-labview-related/problem-with-dll-in-labview.html" title="A Strange Problem When Calling External DLL with LabVIEW">A Strange Problem When Calling External DLL with LabVIEW</a> (0)</li><li>January 16, 2009 -- <a href="http://www.speedvi.com/everything-labview-related/access-different-access-database-files-programmly-in-labview-with-database-connectivity-toolset.html" title="Access Different Access Database Files Programmatically in LabVIEW with Database Connectivity Toolset">Access Different Access Database Files Programmatically in LabVIEW with Database Connectivity Toolset</a> (2)</li><li>January 13, 2009 -- <a href="http://www.speedvi.com/everything-labview-related/a-way-to-improve-user-experience-in-complicated-applications-in-labview.html" title="A Way to Improve User Experience in Complicated Applications in LabVIEW">A Way to Improve User Experience in Complicated Applications in LabVIEW</a> (5)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.speedvi.com/everything-labview-related/move-up-and-down-tree-control-sub-items-programmatically-in-labview.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
