Family Tree Report structure (1 Viewer)

jharding08

Member
Local time
Today, 03:10
Joined
Feb 16, 2021
Messages
55
Hello, I am creating a family tree access app and have the database structure, relationships and hierarchy set up. I just need to create a report that displays the data in a hierarchical structure. I should probably start without pictures and add them later?

Has anyone ever created a report to show parent/sibling/child relationships? I know tree view can do it. Maybe I start there and move to more of a "Ancestry" layout later

Database structure

tblPerson
PersonID (PK)
Last Name
First Name
etc.

tblFamily
FamilyID (PK)_
Spouse1ID (tblPerson.PersonID FK)
Spouse2ID (tblPerson.PersonID FK)

tblChildren
FamilyID (tblFamily.FamilyID FK)
PersonID (tblPerson.PersonID FK)

Thank you for your help
 

Ranman256

Well-known member
Local time
Today, 06:10
Joined
Apr 9, 2015
Messages
4,339
not quite.
you dont need tblChildren, since every person is a child, so tblPersons is the child table.

in tblPerson , add field: FamilyID
to show who's parents belong to this person.
 

jharding08

Member
Local time
Today, 03:10
Joined
Feb 16, 2021
Messages
55
not quite.
you dont need tblChildren, since every person is a child, so tblPersons is the child table.

in tblPerson , add field: FamilyID
to show who's parents belong to this person.
I agree with this, I thought about doing it that way, but I think I saw an example that had tblChildren. I will make the change.
 
Last edited:

jharding08

Member
Local time
Today, 03:10
Joined
Feb 16, 2021
Messages
55
I agree with this, I thought about doing it that way, but I think I saw an example that had tblChildren. I will make the change.

At that point, can I use recursion to query the hierarchy of a person?

Do you have a good example of the query that I could use to show in a tree view or something visual?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 06:10
Joined
May 21, 2018
Messages
8,463
 
Last edited:

MajP

You've got your good things, and you've got mine.
Local time
Today, 06:10
Joined
May 21, 2018
Messages
8,463
Do you have a good example of the query that I could use to show in a tree view or something visual?
Both of these tree views use a very simple query and the recursive code is built in once you build the query.
NodeID
ParentNodeID
NodeText
Indentifier (only needed with a union query not a selfreferencing)

Also may want to PM @The_Doc_Man who has done extensive work doing this and can give some insight for building an APP.
 

jharding08

Member
Local time
Today, 03:10
Joined
Feb 16, 2021
Messages
55
Both of these tree views use a very simple query and the recursive code is built in once you build the query.
NodeID
ParentNodeID
NodeText
Indentifier (only needed with a union query not a selfreferencing)

Also may want to PM @The_Doc_Man who has done extensive work doing this and can give some insight for building an APP.
Thank you for the info. I have a query result that has the personID, ParentID and Name. If I have one column for parent ID and there are two parents, wont there be two person IDs for each person with two parents? This is a unioned query of each spouse in a family


PersonIDFNameLNameFamilyIDParent1ParentFNameParentLName
1​
MaleParent
4​
6​
GrandfatherPaternal
1​
MaleParent
4​
5​
GrandmotherPaternal
2​
FemaleParent
5​
7​
GrandfatherMaternal
2​
FemaleParent
5​
8​
GrandmotherMaternal
3​
MaleChild
1​
2​
FemaleParent
3​
MaleChild
1​
1​
MaleParent
4​
FemaleChild
1​
1​
MaleParent
4​
FemaleChild
1​
2​
FemaleParent
5​
GrandmotherPaternal
20​
17​
GreatMaternalGrandfatherPaternal
5​
GrandmotherPaternal
20​
16​
GreatMaternalGrandmotherPaternal
6​
GrandfatherPaternal
6​
GrandfatherPaternal
7​
GrandfatherMaternal
7​
GrandfatherMaternal
8​
GrandmotherMaternal
8​
GrandmotherMaternal
9​
UncleMaternal
5​
7​
GrandfatherMaternal
9​
UncleMaternal
5​
8​
GrandmotherMaternal
10​
Aunt1Paternal
4​
5​
GrandmotherPaternal
10​
Aunt1Paternal
4​
6​
GrandfatherPaternal
11​
Aunt2Paternal
4​
6​
GrandfatherPaternal
11​
Aunt2Paternal
4​
5​
GrandmotherPaternal
12​
UncleInLawPaternal
12​
UncleInLawPaternal
13​
NiecePaternal
6​
10​
Aunt1Paternal
13​
NiecePaternal
6​
12​
UncleInLawPaternal
14​
NephewPaternal
6​
10​
Aunt1Paternal
14​
NephewPaternal
6​
12​
UncleInLawPaternal
15​
NieceMaternal
33​
9​
UncleMaternal
15​
NieceMaternal
33​
16​
GreatMaternalGrandmotherPaternal
16​
GreatMaternalGrandmotherPaternal
17​
GreatMaternalGrandfatherPaternal
17​
GreatMaternalGrandfatherPaternal
18​
NewFemaleParent
18​
NewFemaleParent
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 06:10
Joined
May 21, 2018
Messages
8,463
If you search on this site I do a lot of recursive examples and treeviews. Most are more concrete because I have been shown a family tree can be more complex if you include all the "parent" types. So I will assume you are only tracking biological parents. @The_Doc_Man explains to me the complexity of when you start worrying about step parents, foster parents, divorces, second marrianges, etc.

If only tracking biological parents then my table is
personID
... other person fields
motherID 'relates to a person ID
fatherID ' relates to a person ID


Most recursive calls in those demos have a single "parentID" (task, subtask,... Unit, subunit...., Folder, subfolder....)
The coefficient of inbreeding is a long complex thread, but demos a recursive call up the mom side of the tree and the dad side of the tree.

This then calculates all the relations (parent, grand parent, great grand parent ....)

The query I am referring to is the query needed to load the tree. It is really just an alias of the fields in the table and a concatenation of the text to display.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 05:10
Joined
Feb 28, 2001
Messages
27,001
I don't like "tree view" diagrams for Genealogy because they don't really let me express relationships quite right. But worse, in my family it gets really ugly because of many cases where there are a lot of half-siblings due to "1st wife died in childbirth, husband remarried and had a bunch of kids from 2nd wife" - and in my family tree, there's just a bunch of that to be shown. In the 1700s and 1800s and into the early 1900s, "prolific" is perhaps not adequate as a description.

Just to show how complex a real family gets: My step-daughter has four fathers and two mothers on the my tree diagram. one biological father, one "legal" father (married to her mother at the time of birth but he bailed out when birth mom died), one father by adoption (originally an uncle by marriage), and one step-father (ME, who married her adoptive mother). One birth mother and one adoptive mother who is originally her aunt.) Most family tree generators really don't like my step-daughter. A simple two-parent database takes one look at my dear M.'s history and barfs.

I had to do a recursive bunch of code because I get all of this in a flat-file from Ancestry.COM in GEDCOM format. Which if you look at it closely is three flat files that are interrelated and smooshed together. I would say "merged" but that would imply a degree of order that really isn't there.

What I build is a linear list of people. Linear ONLY in the sense of one-dimensional, with a single PK, with no particular guarantee of order except that I use the order in which they are reported in the GEDCOM file.

More than halfway into the GEDCOM file, it swaps over to "Family" format. There is a "family" structure that "points to" members of the list as father, mother, or sibling. The pointers are bidirectional so that if X is Y's parent, Y is X's child. Ancestry is thus determined by following parent pointers until you hit the empty pointer. Descendants are done the same way but at each level you have to allow for sibs. The "sibling list" is a single-ended queue from eldest child to youngest child for the mother and father combination of that family. IF a parent dies and the other parent remarries, that counts as, and is treated as, a different family which happens to have one parent in common with the other family.

When I produce an actual tree document, it is in one of two formats because of this data layout that I described.

The Ancestor trees are 3 generations to a page (because if you tried to do more, the print would get too small for an 8 1/2 x 11 printer, and these old eyes have to be careful about that. But it is the standard binary-style tree with mother and father, and four grandparents. If I have more what I do is put an arrow to the right of the grandparent whose tree goes deeper and put a page number there. Since each page is generated recursively, the moment that I return from the recursion, I can put the "to page" number there because I was just there and built that page. The page I built is merely taking the grandparent and making a sub-tree with the person, parent, grandparent branches. When the recursion hits the empty pointers, it stops. The person-page index just remembers the persons who were on each page.

The Descendants trees are build with TWO generations on a page - the husband and wife and the list of their children. If one person married twice, the second marriage has its own page. Again, the cross-page references are generated recursively and I again build a person-page index.

I use a marking system so that there is a third document. If at any time I mentioned someone on either an ancestor page or a descendant page, I marked the fact of the visit. In that case, there is a "phone book" of every person visited in any tree, listing all (well, ... most) of the details I found for that person. I can't reproduce pictures because Ancestry.COM doesn't make that easy for me to download. So some things I skip.

The generator app for this starts with a GEDCOM file, imports it, analyzes it, sanity-checks it (and builds a diagnostic file so I can review any questionable entries), and then pauses. I get to pick someone as the point of focus and let 'er rip. It checks whether that person has a spouse and, if so, builds TWO ancestry trees (selected person and spouse) and then builds ONE descendant tree (selected person and spouse) and ONE family list book. For my wife as the anchor (a presentation I'm building for my grandsons), over 250 people are in the FOUR trees - because I'm her second husband, so an extra ancestry tree gets generated.

I see this has gotten rather lengthy. I'll break here and answer questions as they come up.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 06:10
Joined
May 21, 2018
Messages
8,463
However if you want to do a simple binary tree that is bounded by X generations, you can do it very simply without a recursive call. In this image (it is birds not people) I can show 6 generations max. What is nice is you can click on any bird and make them the base node incase you want to span up farther, and you can get the details on the base node. You could make this more aesthetic, but it is real easy to display data like this because it only requires you to loop the textboxes and recursion not needed.

This works well for birds, with only biological relationships (no adopted, step, or other birds parents identified)


BinaryTree.png
 

jharding08

Member
Local time
Today, 03:10
Joined
Feb 16, 2021
Messages
55
Thank you all for the feedback. I just went with the basic tree view based off of the TreeViewForm class. I created my UNION query off of two formatted parent queries, since a Family has two parents. The tree view errored on keys already existing, which I figured since I have two IDs for each child.

I ran it for each individual parent query and got no errors and good relationships, but only for one side. I guess my next step is sorting the queries to show oldest people first.

And somehow I need to show spouses with each other if part of a family. Would it be better to just do one person and then do another query that formulates the nodeText to show the spouse? Only problem with this is that I am looking to click on any person and recreate the tree based on that person selection

QryPerson1

IDParentIDnodeTextidentifier
PER1PER6Male ParentPER
PER2PER8Female ParentPER
PER3PER1Male ChildPER
PER4PER1Female ChildPER
PER5PER17Grandmother PaternalPER
PER6PERGrandfather PaternalPER
PER7PERGrandfather MaternalPER
PER8PERGrandmother MaternalPER
PER9PER8Uncle MaternalPER
PER10PER6Aunt1 PaternalPER
PER11PER6Aunt2 PaternalPER
PER12PERUncleInLaw PaternalPER
PER13PER10Niece PaternalPER
PER14PER10Nephew PaternalPER
PER15PER9Niece MaternalPER
PER16PERGreatMaternalGrandmother PaternalPER
PER17PERGreatMaternalGrandfather PaternalPER
PER18PERNewFemale ParentPER

Treeview-Person 1
1613586592785.png


qryPerson2


TreeView-Person2
1613586629177.png

IDParentIDnodeTextidentifier
PER1PER5Male ParentPER
PER2PER7Female ParentPER
PER3PER2Male ChildPER
PER4PER2Female ChildPER
PER5PER16Grandmother PaternalPER
PER6PERGrandfather PaternalPER
PER7PERGrandfather MaternalPER
PER8PERGrandmother MaternalPER
PER9PER7Uncle MaternalPER
PER10PER5Aunt1 PaternalPER
PER11PER5Aunt2 PaternalPER
PER12PERUncleInLaw PaternalPER
PER13PER12Niece PaternalPER
PER14PER12Nephew PaternalPER
PER15PERNiece MaternalPER
PER16PERGreatMaternalGrandmother PaternalPER
PER17PERGreatMaternalGrandfather PaternalPER
PER18PERNewFemale ParentPER
qryPersonUNION


IDParentIDnodeTextidentifier
PER1PER5Male ParentPER
PER1PER6Male ParentPER
PER10PER5Aunt1 PaternalPER
PER10PER6Aunt1 PaternalPER
PER11PER5Aunt2 PaternalPER
PER11PER6Aunt2 PaternalPER
PER12PERUncleInLaw PaternalPER
PER13PER10Niece PaternalPER
PER13PER12Niece PaternalPER
PER14PER10Nephew PaternalPER
PER14PER12Nephew PaternalPER
PER15PERNiece MaternalPER
PER15PER9Niece MaternalPER
PER16PERGreatMaternalGrandmother PaternalPER
PER17PERGreatMaternalGrandfather PaternalPER
PER18PERNewFemale ParentPER
PER2PER7Female ParentPER
PER2PER8Female ParentPER
PER3PER1Male ChildPER
PER3PER2Male ChildPER
PER4PER1Female ChildPER
PER4PER2Female ChildPER
PER5PER16Grandmother PaternalPER
PER5PER17Grandmother PaternalPER
PER6PERGrandfather PaternalPER
PER7PERGrandfather MaternalPER
PER8PERGrandmother MaternalPER
PER9PER7Uncle MaternalPER
PER9PER8Uncle MaternalPER
TreeView - Person UNION (with Errors)
1613586649000.png
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 06:10
Joined
May 21, 2018
Messages
8,463
I am a little confused at what I am seeing.

1. Are you planning to dynamically calculate the relationship labels (Parent, Grand Parent, child, etc.) based on a selected starting node? This can be done
2. I would think you might want to do this in a different order. This is would need some specific coding since it is more than simple recursion. You would start with one node and that is the person of interest. If I select me.



+ ME

then expand
Code:
ME
  Spouse - (Or this goes directly in the top level Node text i.e.  John Smith (Wife: Mary Smith)
  + Children
  + Siblings
  + Father
  + Mother

Children and siblings are self explanatory and would expand and be filled in non recursive.
If you expand Father you get the same minus the spouse (seperate node). You get the labels as they relate to the selected node and as they related to the based node (Me)
+ Siblings (Aunts, Uncles)
+ Father (Grandfather Paternal)
+ Mother (GrandMother Paternal)


My tree starts to look like
Code:
Me
  My Wife
  Children
     Son
     Daugther
  Siblings
     Sister 1
     Sister 2
  Father
     Sister (Aunt)
     Brother (Uncle)
     + Father (Grand Father)
     + Mother (Grand Mother)
  +Mother

I think I get the tree you should, but it is hard to understand in that view. Maybe if it was ordered it would make more sense.
 

jharding08

Member
Local time
Today, 03:10
Joined
Feb 16, 2021
Messages
55
I think I want to originally show the entire tree for the oldest person (no ParentID). Then have the ability to select a person from the tree and Clear the tree and re-Initiate the tree and then show just the descendants from that person. Hopefully there is a way to show spouse for any family entry, so that person is clickable for navigation.

So if I select Male Parent from the table, it should show(and some how include the Spouse in a same level node?):
-Male Parent
----Male Child
----Female Child
-Female Parent(?)

For this application, there will be a split page form with the tree on the left and a full Member Detail on the right, so the tree will always "root" at one person, but also provide navigation. Since its just the descendants, I'll have to put a click event on the Parents section of the Member Detail to allow to ascend up the tree

The problem I am seeing is that a child will have two parentIDs (in most cases). Depending on who is selected in the tree, I can show descendants down the tree using just one of the queries (Spouse1 or Spouse2), if the spouse1s all relate to the person selected and spouse2s all relate to the spouse of the person selected. I didnt want to do Father and Mother for Spouse1 and Spouse2 to be more flexible, but will this create an issue where one family has spouse1 the male and spouse2 the female, and then another family is spouse 2 the male and spouse1 the female? I'd need to union the queries at that point? I am going to try to implement this further and will provide more details

Other issue I see is when I select a person in the tree, the node I get is the ID, but in the Init function, it uses the ParentStartID, so if I put the SelectedNode in that Init statement, it pulls just the children without showing the person selected. If I do SelectedNode.parent.Key, then it will show the person selected, but also any siblings that have that that same parentID. Not sure that is a bad thing, but not sure if I can just show selected.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 06:10
Joined
May 21, 2018
Messages
8,463
I think I want to originally show the entire tree for the oldest person (no ParentID).

You will have to pick a person as your base node. If you pick all IDs with no parents you will get a lot of trees. So if you are tracking your tree back X generations, you are not tracking your spouse back X generations. You may not have anything on here side except she is a parent to your kids.

Then have the ability to select a person from the tree and Clear the tree and re-Initiate the tree and then show just the descendants from that person.

That should be easy to do since the recursive code is setup to provide a starting node. Normally it is like you said where the base nodes are everything without a parent, but in this case you can pass in the base node. It is one of the load parameters

Hopefully there is a way to show spouse for any family entry, so that person is clickable for navigation.
If I was going to show spouse. I would first load the tree recursively. Then loop the nodes and check for a spouse. And add the spouse in

So if I select Male Parent from the table, it should show(and some how include the Spouse in a same level node?):
-Male Parent
----Male Child
----Female Child
-Female Parent(?)

Where does it make sense to add the female parent? What you show would be an easy solution, if that works for you. Is it OK not to double up the children under the non biological Parent? Since you are spanning from the top down the biological parent is the parent related to the top node. The other options with a little bit of code could be

Biological Parent / Spouse Parent
--- Child
---Child 2

Currently the code is written so that when you click or select a node, the record PK and table are returned. That way you associate a node with a record. In this case you could add code to pop up a small form says which one do you want Mother or Father. The PK is stored in the Node Key. You would have to modify the node create event to make the key something like PER123;PER456. And you could do this. This would be some work but doable.

For this application, there will be a split page form with the tree on the left and a full Member Detail on the right, so the tree will always "root" at one person, but also provide navigation.

That is pretty standard how I use the tree

Since its just the descendants, I'll have to put a click event on the Parents section of the Member Detail to allow to ascend up the tree
This can be done. If you clicked on a single person. Then you should create the parent node/s as the base node

The problem I am seeing is that a child will have two parentIDs (in most cases). Depending on who is selected in the tree, I can show descendants down the tree using just one of the queries (Spouse1 or Spouse2), if the spouse1s all relate to the person selected and spouse2s all relate to the spouse of the person selected. I didnt want to do Father and Mother for Spouse1 and Spouse2 to be more flexible, but will this create an issue where one family has spouse1 the male and spouse2 the female, and then another family is spouse 2 the male and spouse1 the female?

This is really the dilemma on how you want the tree to work and how you handle spouses. If in your person table you relate persons to their biological family and spouses are identified only in the family table it should not matter. If I am doing my tree I relate myself to my parents, but I do not relate my wife to her in laws. Now this could get really hard if you decide to combine your family tree and her family tree. I think you could do it, but would require an additional field to say which tree you are spanning. Because now you have a network not a tree.
By far the easiest solution is to put the non “biological” spouse as a node at the same level as the “biological” spouse and just put the children under the biological spouse. If I get some time I can try to demo the more complex approach with a combined Parent node.
I'd need to union the queries at that point? I am going to try to implement this further and will provide more detail

7. If you want to simply put the spouse in as a node at the same level then no. Simply build the tree for the biological children off of the base node. Then once built, loop the nodes collection. Check each node for a spouse. If a spouse exists then add. However, since the children are not under both parents the issue could arise where you have a first wife and second wife or the spouse is not the parent of all the kids.
In this case you may have to add in the spouse node and then check for children under that spouse. Again since this is not recursive it should not be that hard.

In other words Grandfather Jim Married GrandMom Mary. Mary brought three kids to the marriage.

Other issue I see is when I select a person in the tree, the node I get is the ID, but in the Init function, it uses the ParentStartID, so if I put the SelectedNode in that Init statement, it pulls just the children without showing the person selected. If I do SelectedNode.parent.Key, then it will show the person selected, but also any siblings that have that that same parentID. Not sure that is a bad thing, but not sure if I can just show selected

Your best solution would be to add the parent ID then delete (if you want) any brothers and sisters of the base node.

Bottom line you may not want to try to do it all in a single load of the tree. You may find easier solutions to load then add, modify, and delete nodes. Again this can be a lot easier since it is not recursive. You can loop the nodes. Get the PK and modify spouses, children, parents and the node itself. The hard part is synching the node keys with a primary key so the node and the record are "synched".
 

jharding08

Member
Local time
Today, 03:10
Joined
Feb 16, 2021
Messages
55
I've got it now where I select the oldest person and start the tree with him/her and show the tree associated with that person as they show in the Member Details too. I need to add the spouse, and will probably just do a separate query to grab that info and add a node at the same level. When a node of a descendant is clicked, it re-Inits the tree to show that person at the root and shows that person's member details. I show Parents in that side of the form, so I'll add click events to show the parent as the root of the tree (as a way to ascend up the tree).

I was thinking the same thing as it applies to the other spouse of a child. I did a tree for my parents and my children showed up under me, but when I did my wifes mother, she showed up under her mom, but our children did not show up under her, but her brother and his child showed up under her mother.

If possible, I'd need to relate children to the "family ID", but have the parents still use a personID.

I think I can figure out the spouse at the same level through code, but need a dataset that will combine spouse1 and spouse2 of a family to the children. I am doing my wifes side as well as my sister's spouses, so it looks like this. I changed the code to look at an individual query (either for SPouse1 or Spouse2, based on the root persons family ID). In this instance, it was for Grandfather Paternal who was Spouse1 in the family, so all the children are just relating to the Spouse1 fields of the Family table. It might happen where if I move all the spouses to the same level as the parent with the children, it will clean it up

1613671846258.png


UPDATE: So it looks like its working pretty well with the union query as long as I show just descendants. I still have to show spouses, but its working so far...I think
 
Last edited:

MajP

You've got your good things, and you've got mine.
Local time
Today, 06:10
Joined
May 21, 2018
Messages
8,463
I am kind of lost on your table structure so not sure of the answers. Are you relating through the family table or directly to a mother, father ID.
I was thinking the same thing as it applies to the other spouse of a child. I did a tree for my parents and my children showed up under me, but when I did my wifes mother, she showed up under her mom, but our children did not show up under her, but her brother and his child showed up under her mother.
Based on that I am assuming you are reading only one of the spouses and relating the children to just one spouse. Since you are not duplicating the children under two parent nodes, I assume you are picking one.

A complicated ID, but it should work. IF you have figured out how the tree "synchs" with the data, I store a concatenated identifier and PK in the key and just identifier in the tag. This allows me to know both the key and the table where it came from. The table where it comes from is important when you do not have a self referencing table So you could load the tree you see without spouses. Then loop the tree again. If for example
-MaleParent is PK 123. This is stored as PER123 in the Key and PER in the tag
You could check if MaleParent is in the Family table (has children)
You could change the node to
- Male Parent Name / Female Parent Name and change the key to FAM789 (relate a "parent" to a family table and non parents stay related to the person table)

(Or possible you can leverage the node tag (since you are self referencing) and store the Family ID in the tag and the PersonID in the key)

Now when you click on a combined parent node you can do the prompt and ask "Which Parent" to show details. Or modify the detail form to show 2 records.

Doable, but somewhat complex.

Or simple, but not sure if it is clear
--Biological Parent
--- Spouse: SpouseName
--- Child1
---- Child 2

If you leave the spouse at same level as the Biological parent then would that be confusing. The spouse and other siblings are at same level, but you do not really see the link of the two.

Bottom line you should have hooks to do this any way you want. Again I think the easy solution is to load recursively and then modify by looping the nodes collection and modifying as necessary.
 

jharding08

Member
Local time
Today, 03:10
Joined
Feb 16, 2021
Messages
55
I think I have the tree displaying the way that I want, its just if I want to add Spouse or anything else, I would need to go into the code to add it during the adding of the nodes.

Next question is, is it possible to change the display of the tree view nodes, such as adding a picture at the node (not just an icon). For the family tree, looking to do a picture with nodetext (name, birthdate, etc).
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 06:10
Joined
May 21, 2018
Messages
8,463
its just if I want to add Spouse or anything else, I would need to go into the code to add it during the adding of the nodes.
You can. I still think it would be way easier to build the recursive tree then add these other nodes. That is how I would do it.

As for the picture you are not talking about the icon, but something in the text? I cannot envision that. But most likely the answer is no. The node is not richtext if you wanted something like.
--Parent Name🎂
---- Child Name
So this is not what you mean.
Image.png
 

jharding08

Member
Local time
Today, 03:10
Joined
Feb 16, 2021
Messages
55
I am using this tree view as read-only in a report. I use the same addrootnode and addbranch to add the persons as well as their spouse. each "family" node looks like:

PersonName
MarriedTo:
SpouseName

I am trying to add birthdates for the people and marriage date to "Married To:" in a left aligned column on the right hand side. I figured I can add the node as PersonName, then Space(number of spaces) then Date.

I calculate the spaces need by assigning each node level a length of total spaces to get to the date aligned column, then subtract from the length of PersonName. So if level 1 was 100 total spaces and the person name was 20, then the spaces append to the node would be: PersonName&Space(80)&Birthdate.

So the next line should be "Married To:" & Space(89) & MarriageDate, but it doesnt line up, its shorter and pulls the date to the left

Do I need to use a monospace font? To make sure all characters are the same width? What works best for tree view/access to do this?
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 06:10
Joined
May 21, 2018
Messages
8,463
Any spacing requires a non proportional font. Try courier new to see what that looks like. Never done this in a tree view so I have no idea what it will do.
Can you share a screen shot?
 

Users who are viewing this thread

Top Bottom