i think you mean, that you want to use the MiscOptions.toGridExtensions which makes it behave more like a grid, rather than a tree. There is a demo for this.<br><br><div class="gmail_quote">On Nov 12, 2007 4:42 PM, Ross Levis &lt;
<a href="mailto:ross@stationplaylist.com">ross@stationplaylist.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-NZ">

<div>

<p><span style="color: rgb(31, 73, 125);">Thanks for that.&nbsp; I think I
get it now.&nbsp; If I define 5 columns in the Columns property then the
component will call the OnGetText event 5 times for each line (node).</span></p>

<p><span style="color: rgb(31, 73, 125);">&nbsp;</span></p>

<p><span style="color: rgb(31, 73, 125);">I just have to work out what </span><span style="font-size: 11pt; color: black;">NodeData := Sender.GetNodeData(Node)</span><span style="color: rgb(31, 73, 125);"> does but there are examples for this so I should be
right, thanks.</span></p>

<p><span style="color: rgb(31, 73, 125);">&nbsp;</span></p>

<p><span style="color: rgb(31, 73, 125);">Ross.</span></p>

<p><span style="color: rgb(31, 73, 125);">&nbsp;</span></p>

<div>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">

<p><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> <a href="mailto:delphi-bounces@delphi.org.nz" target="_blank">delphi-bounces@delphi.org.nz</a>
[mailto:<a href="mailto:delphi-bounces@delphi.org.nz" target="_blank">delphi-bounces@delphi.org.nz</a>] <b>On Behalf Of </b>Conor Boyd<br>
<b>Sent:</b> Monday, 12 November 2007 4:06 p.m.<br>
<b>To:</b> NZ Borland Developers Group - Delphi List<br>
<b>Subject:</b> RE: [DUG] Soft-Gems Virtual TreeView for a ListView</span></p>

</div>

</div><div><div></div><div class="Wj3C7c">

<p>&nbsp;</p>

<p><span style="font-size: 10pt; color: blue;">The Header property of TVirtualStringTree has a Columns
property.&nbsp; Specify your columns in there.</span><span></span></p>

<p><span>&nbsp;</span></p>

<p><span style="font-size: 10pt; color: blue;">Then the OnGetText event has a Column parameter.</span><span></span></p>

<p><span>&nbsp;</span></p>

<p><span style="font-size: 10pt; color: blue;">So you can do something like this in your OnGetText event handler:</span><span></span></p>

<p><span>&nbsp;</span></p>

<p><span style="font-size: 10pt; color: blue;">procedure TFileSelectionDialog.vstFilesGetText(Sender:
TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType:
TVSTTextType;<br>
&nbsp; var CellText: WideString);<br>
var<br>
&nbsp; NodeData : PTreeViewNodeData;<br>
begin<br>
&nbsp; NodeData := Sender.GetNodeData(Node);</span><span></span></p>

<div>

<p><span>&nbsp;</span></p>

</div>

<p><span style="font-size: 10pt; color: blue;">&nbsp; CellText := &#39;&#39;;</span><span></span></p>

<div>

<p><span>&nbsp;</span></p>

</div>

<p><span style="font-size: 10pt; color: blue;">&nbsp; case Column of<br>
&nbsp;&nbsp;&nbsp; 0:&nbsp; CellText := ExtractFileName(NodeData.Filename);<br>
&nbsp;&nbsp;&nbsp; 1:&nbsp; begin<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if not NodeData.IsFolder
then<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CellText :=
DateTimeToStr(NodeData.FileDate);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; end;<br>
&nbsp; end;<br>
end;</span><span></span></p>

<div>

<p><span style="font-size: 10pt; color: blue;">This is from when I&nbsp;wrote&nbsp;our&nbsp;own&nbsp;file&nbsp;selection&nbsp;dialog,&nbsp;since&nbsp;the&nbsp;built-in&nbsp;Delphi&nbsp;one&nbsp;can&#39;t&nbsp;cope&nbsp;with&nbsp;more&nbsp;than&nbsp;a&nbsp;certain&nbsp;number&nbsp;of&nbsp;files</span><span></span></p>

</div>

<div>

<p><span style="font-size: 10pt; color: blue;">(if&nbsp;you&#39;re&nbsp;interested&nbsp;in&nbsp;the&nbsp;specifics,&nbsp;IIRC
the&nbsp;number&nbsp;of&nbsp;files&nbsp;the built-in
one&nbsp;can&nbsp;cope&nbsp;with&nbsp;is&nbsp;limited&nbsp;to&nbsp;the&nbsp;number&nbsp;of&nbsp;fully&nbsp;qualified
paths which will fit into 32000&nbsp;bytes or something - it&#39;s a problem with
the underlying WinAPI).</span><span></span></p>

</div>

<div>

<p><span>&nbsp;</span></p>

</div>

<div>

<p><span style="font-size: 10pt; color: blue;">Hopefully that&#39;s enough to get you going.&nbsp; Ask away if you&#39;ve
got more questions.</span><span></span></p>

</div>

<div>

<p><span>&nbsp;</span></p>

</div>

<div>

<p><span style="font-size: 10pt; color: blue;">HTH,</span><span></span></p>

</div>

<div>

<p><span>&nbsp;</span></p>

</div>

<div>

<p><span style="font-size: 10pt; color: blue;">Conor</span><span></span></p>

</div>

<div>

<p><span>&nbsp;</span></p>

</div>

<div style="text-align: center;" align="center"><span lang="EN-US">

<hr align="center" size="3" width="100%">

</span></div>

<p><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> <a href="mailto:delphi-bounces@delphi.org.nz" target="_blank">delphi-bounces@delphi.org.nz</a>
[mailto:<a href="mailto:delphi-bounces@delphi.org.nz" target="_blank">delphi-bounces@delphi.org.nz</a>] <b>On Behalf Of </b>Ross Levis<br>
</span><span style="font-size: 10pt; color: blue;" lang="EN-US">&nbsp;</span><span lang="EN-US"></span></p>

<p><span lang="EN-US">I
think someone mention they were using Virtual TreeView recently.&nbsp; I heard
that it can be made to look like a standard ListView, so I'm
investigating it to replace a TListView in an app of mine which takes far too
long to load up to 20,000 items.</span></p>

<p>&nbsp;</p>

<p>I can't use TListView in virtual mode as it seems way
too difficult to enable sorting on columns which I need.&nbsp; The Virtual
TreeView appears to handle sorting as easy as TListView does in non-virtual
mode.</p>

<p>&nbsp;</p>

<p>I'm just having difficultly working out how the use
the component!&nbsp; I realize I need to set up a record for each set of data
but I can't work out how to add columns of data.&nbsp; The examples are
mostly involved with tree structures.</p>

<p>&nbsp;</p>

<p>I'm hoping someone can quote for me a basic piece of
code for adding say 2 items with 2 or 3 columns.</p>

</div></div></div>

</div>


<br>_______________________________________________<br>NZ Borland Developers Group - Delphi mailing list<br>Post: <a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a><br>Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">
http://delphi.org.nz/mailman/listinfo/delphi</a><br>Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br></blockquote></div><br><br clear="all">
<br>-- <br>Kyley Harris<br>Harris Software<br>+64-21-671-821