I have a directory tree that almost looks like this:
The above image is what I am trying to achieve. Here's my one which I took help and slightly modified from Making a (simple) directory tree
I know I should have made a bit more effort, but I am not that of a pro when it comes to making charts especially related to complex trees. Here what I am looking for is a way to make background color of each nodes gray except the primary (or root) node. The primary node should have box as shown in the image. Also I am looking for a way to arbitrarily modify the node to have boxes like the primary node as shown at the middle and bottom of the image. Also that the small box at the left should have a minus sign (expand form). The caption at the top is optional, and the lines at the end of the image are to be ignored. It doesn't matter which packages are to be used as long as they are convenient.
UPDATE
I managed to improve my picture a bit by using fill, inner sep, and s sep as well as editing the node in edge path to mimic the expand form. Now all I need a little bit help on making the edge path similar to the first image.
Here's my code:
\documentclass[border=5pt]{standalone}
\usepackage{forest}
\usepackage{xcolor}
\definecolor{mygray}{RGB}{224,224,224}
\begin{document}
\begin{forest}
for tree={
font=\sffamily,
if level=0
{fill=white,draw=black}
{fill=mygray,draw=black},
grow'=0,
child anchor=west,
parent anchor=south,
anchor=west,
calign=first,
inner xsep= 15pt,
s sep=15pt,
edge path={
\noexpand\path [draw, \forestoption{edge}]
(!u.south west) +(7.5pt,0) |- node[fill=white,draw,inner sep=1pt,align=center] {$-$} (.child anchor)\forestoption{edge label};
},
before typesetting nodes={
if n=1
{insert before={[,phantom]}}
{}
},
fit=band,
before computing xy={l=35pt},
}
[R1SC4000R - Processor for Service
[SETUIXNAM]
[{QC2UTIL1,R1SC3000ER,DOCERROR}]
[STEPCONDITION
[LOKUPUIX
[R1SB8000R - Handle User Index\quad UIX,fill=white]
]
[{GETFROMUIX,GETFROMUIX}]
[{GETFROMUIX,GETFROMUIX}]
]
[ONESUB
[{QC2UTIL1,R1SC3000ER,DOCERROR}]
[UIXPERM2TEMP
[{GETFROMUIX,GETFROMUIX}]
[CLRUIX
[R1SB8000R - Handle User Index\quad UIX,fill=white]
]
]
]
]
\end{forest}
\end{document





-node to the west of a parent subfolder. I didn't have an inch of idea to fix it. As for the second issue, I thought filling node white would solve the problem, but it did not. Your solution really counts as a possible answer. If possible, could you update your answer to include the-beside the root node to show that it is expandable? That's ok if not possible – SolidMark Sep 14 '21 at 09:51folder, I might use your idea in the following release. – Sašo Živanović Sep 14 '21 at 10:28