Quite possibly.
 
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.
 
C.

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Kyley Harris
Sent: Monday, 12 November 2007 4:50 p.m.
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Soft-Gems Virtual TreeView for a ListView


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.


On Nov 12, 2007 4:42 PM, Ross Levis < [EMAIL PROTECTED]> wrote:


        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).

         

        I just have to work out what NodeData :=
Sender.GetNodeData(Node) does but there are examples for this so I
should be right, thanks.

         

        Ross.

         

        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Conor Boyd
        Sent: Monday, 12 November 2007 4:06 p.m.
        To: NZ Borland Developers Group - Delphi List
        Subject: RE: [DUG] Soft-Gems Virtual TreeView for a ListView

         

        The Header property of TVirtualStringTree has a Columns
property.  Specify your columns in there.

         

        Then the OnGetText event has a Column parameter.

         

        So you can do something like this in your OnGetText event
handler:

         

        procedure TFileSelectionDialog.vstFilesGetText(Sender:
TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType:
TVSTTextType;
          var CellText: WideString);
        var
          NodeData : PTreeViewNodeData;
        begin
          NodeData := Sender.GetNodeData(Node);

         

          CellText := '';

         

          case Column of
            0:  CellText := ExtractFileName(NodeData.Filename);
            1:  begin
                  if not NodeData.IsFolder then
                    CellText := DateTimeToStr(NodeData.FileDate);
                end;
          end;
        end;

        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

        (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).

         

        Hopefully that's enough to get you going.  Ask away if you've
got more questions.

         

        HTH,

         

        Conor

         

        
________________________________


        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ross Levis
         

        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.

         

        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.

         

        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.

         

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


        _______________________________________________
        NZ Borland Developers Group - Delphi mailing list
        Post: [email protected]
        Admin: http://delphi.org.nz/mailman/listinfo/delphi
        Unsubscribe: send an email to [EMAIL PROTECTED] with
Subject: unsubscribe
        




-- 
Kyley Harris
Harris Software
+64-21-671-821 
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: [email protected]
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe

Reply via email to