Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8154865
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:29:51+00:00 2026-06-06T16:29:51+00:00

I use SoftGem’s VirtualStringTree in Delphi 7. Is there a way to enable full

  • 0

I use SoftGem’s VirtualStringTree in Delphi 7.

Is there a way to enable full grid lines (just as in a TListView)? I can only find toShowHorzGridLines, which only shows lines for current nodes, not anything in the empty space below, and toShowVertGridLines, which shows only vertical lines.

How do I show them in the empty space before items are added?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T16:29:53+00:00Added an answer on June 6, 2026 at 4:29 pm

    I don’t think there is an easy way to implement this without modifying PaintTree method since none of the node events cannot be fired because nodes whose lines should be drawn simply doesn’t exist yet.

    Here is an dirty way how to additionally draw the horizontal lines based on the lowest visible node. In fact it draws lines with distance of the DefaultNodeHeight value in the area filled by orange color in this screenshot:

    enter image description here

    Here is the code:

    type
      TVirtualStringTree = class(VirtualTrees.TVirtualStringTree)
      public
        procedure PaintTree(TargetCanvas: TCanvas; Window: TRect; Target: TPoint;
          PaintOptions: TVTInternalPaintOptions; PixelFormat: TPixelFormat = pfDevice); override;
      end;
    
    implementation
    
    { TVirtualStringTree }
    
    procedure TVirtualStringTree.PaintTree(TargetCanvas: TCanvas; Window: TRect;
      Target: TPoint; PaintOptions: TVTInternalPaintOptions;
      PixelFormat: TPixelFormat);
    var
      I: Integer;
      EmptyRect: TRect;
      PaintInfo: TVTPaintInfo;
    begin
      inherited;
      if (poGridLines in PaintOptions) and (toShowHorzGridLines in TreeOptions.PaintOptions) and
        (GetLastVisible <> nil) then
      begin
        EmptyRect := GetDisplayRect(GetLastVisible,
          Header.Columns[Header.Columns.GetLastVisibleColumn].Index, False);
        EmptyRect := Rect(ClientRect.Left, EmptyRect.Bottom + DefaultNodeHeight,
          EmptyRect.Right, ClientRect.Bottom);
        ZeroMemory(@PaintInfo, SizeOf(PaintInfo));
        PaintInfo.Canvas := TargetCanvas;
        for I := 0 to ((EmptyRect.Bottom - EmptyRect.Top) div DefaultNodeHeight) do
        begin
          PaintInfo.Canvas.Font.Color := Colors.GridLineColor;
          DrawDottedHLine(PaintInfo, EmptyRect.Left, EmptyRect.Right,
            EmptyRect.Top + (I * DefaultNodeHeight));
        end;
      end;
    end;
    

    And here the result with constant and variable node height:

    enter image description here

    The glitch (the lines shifted from the left side) visible on the screenshot above is just a consequence of a dotted line rendering. If you set the LineStyle property on your virtual tree view to lsSolid you will see the correct result.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Use scenario is pretty simple: I have a desktop only application that could be
use strict; use warnings; my $newPasswd = 'abc123'; my @lines = ( pwd =
'''use Jython''' import shutil print dir(shutil) There is no, shutil.move, how does one move
Use OPENXML to get dt element in MSSQL 2005. How can I get xmlns:dt
use level1\level2\level3; Can someone explain with a simple demo ?
Use PHP and MySQL. In my table, there is date field (datetime) recorded by
use I can't divide into segads. As for my above example if 5 threads
Use open syscall to write and create a file ,there's no attributes with the
Use Case Show a photo uploaded by the user in a square box with
use C#,want to upload excel file on google doc. bellow syntax use to upload

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.