<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=764132319-12112007><FONT face=Arial
color=#0000ff size=2>Quite possibly.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=764132319-12112007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=764132319-12112007><FONT face=Arial
color=#0000ff size=2>I can't remember which other properties I had to set (and
there are a lot of properties!), but IIRC I had a bit of trouble tracking down
the Columns one.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=764132319-12112007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=764132319-12112007><FONT face=Arial
color=#0000ff size=2>C.</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> delphi-bounces@delphi.org.nz
[mailto:delphi-bounces@delphi.org.nz] <B>On Behalf Of </B>Kyley
Harris<BR><B>Sent:</B> Monday, 12 November 2007 4:50 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<BR></FONT><BR></DIV>
<DIV></DIV>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 < <A
href="mailto:ross@stationplaylist.com">ross@stationplaylist.com</A>>
wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<DIV lang=EN-NZ vlink="purple" link="blue">
<DIV>
<P><SPAN style="COLOR: rgb(31,73,125)">Thanks for that. I think I get it
now. 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)"></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)"></SPAN> </P>
<P><SPAN style="COLOR: rgb(31,73,125)">Ross.</SPAN></P>
<P><SPAN style="COLOR: rgb(31,73,125)"></SPAN> </P>
<DIV>
<DIV
style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: rgb(181,196,223) 1pt solid; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; BORDER-LEFT: medium none; PADDING-TOP: 3pt; BORDER-BOTTOM: medium none">
<P><B><SPAN lang=EN-US style="FONT-SIZE: 10pt">From:</SPAN></B><SPAN
lang=EN-US style="FONT-SIZE: 10pt"> <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> </P>
<P><SPAN style="FONT-SIZE: 10pt; COLOR: blue">The Header property of
TVirtualStringTree has a Columns property. Specify your columns in
there.</SPAN><SPAN></SPAN></P>
<P><SPAN></SPAN> </P>
<P><SPAN style="FONT-SIZE: 10pt; COLOR: blue">Then the OnGetText event has a
Column parameter.</SPAN><SPAN></SPAN></P>
<P><SPAN></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></SPAN> </P>
<P><SPAN style="FONT-SIZE: 10pt; COLOR: blue">procedure
TFileSelectionDialog.vstFilesGetText(Sender: TBaseVirtualTree; Node:
PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;<BR> var
CellText: WideString);<BR>var<BR> NodeData :
PTreeViewNodeData;<BR>begin<BR> NodeData :=
Sender.GetNodeData(Node);</SPAN><SPAN></SPAN></P>
<DIV>
<P><SPAN></SPAN> </P></DIV>
<P><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> CellText :=
'';</SPAN><SPAN></SPAN></P>
<DIV>
<P><SPAN></SPAN> </P></DIV>
<P><SPAN style="FONT-SIZE: 10pt; COLOR: blue"> case Column
of<BR> 0: CellText :=
ExtractFileName(NodeData.Filename);<BR> 1:
begin<BR> if not
NodeData.IsFolder
then<BR>
CellText :=
DateTimeToStr(NodeData.FileDate);<BR>
end;<BR> end;<BR>end;</SPAN><SPAN></SPAN></P>
<DIV>
<P><SPAN style="FONT-SIZE: 10pt; COLOR: blue">This is from when
I wrote our own file selection dialog, since the built-in Delphi one can't cope with more than a certain number of files</SPAN><SPAN></SPAN></P></DIV>
<DIV>
<P><SPAN
style="FONT-SIZE: 10pt; COLOR: blue">(if you're interested in the specifics, IIRC
the number of files the built-in
one can cope with is limited to the number of fully qualified
paths which will fit into 32000 bytes or something - it's a problem with
the underlying WinAPI).</SPAN><SPAN></SPAN></P></DIV>
<DIV>
<P><SPAN></SPAN> </P></DIV>
<DIV>
<P><SPAN style="FONT-SIZE: 10pt; COLOR: blue">Hopefully that's enough to get
you going. Ask away if you've got more
questions.</SPAN><SPAN></SPAN></P></DIV>
<DIV>
<P><SPAN></SPAN> </P></DIV>
<DIV>
<P><SPAN
style="FONT-SIZE: 10pt; COLOR: blue">HTH,</SPAN><SPAN></SPAN></P></DIV>
<DIV>
<P><SPAN></SPAN> </P></DIV>
<DIV>
<P><SPAN
style="FONT-SIZE: 10pt; COLOR: blue">Conor</SPAN><SPAN></SPAN></P></DIV>
<DIV>
<P><SPAN></SPAN> </P></DIV>
<DIV style="TEXT-ALIGN: center" align=center><SPAN lang=EN-US>
<HR align=center width="100%" SIZE=3>
</SPAN></DIV>
<P><B><SPAN lang=EN-US style="FONT-SIZE: 10pt">From:</SPAN></B><SPAN
lang=EN-US style="FONT-SIZE: 10pt"> <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 lang=EN-US
style="FONT-SIZE: 10pt; COLOR: blue"> </SPAN><SPAN lang=EN-US></SPAN></P>
<P><SPAN lang=EN-US>I think someone mention they were using Virtual TreeView
recently. 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> </P>
<P>I can't use TListView in virtual mode as it seems way too difficult to
enable sorting on columns which I need. The Virtual TreeView appears to
handle sorting as easy as TListView does in non-virtual mode.</P>
<P> </P>
<P>I'm just having difficultly working out how the use the component! 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. The examples are mostly involved with tree
structures.</P>
<P> </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 </BODY></HTML>