Hello everyone
Is there a way to change the font size into a Treeview in access?
Thanks for the help!!
Hello everyone
Is there a way to change the font size into a Treeview in access?
Thanks for the help!!
you had me curious so i had to do a quick google search and found this code if that helps
http://www.vbforums.com/showthread.p...ent-Node-Color
looks like there is a spot to set the font size
Don't you have this part of the code available?, I cannot open this website
In fact looking for the properties into my VB code just I could set the color, but not the font size
This should work -
Code:Me.YourTreeViewControlName.Font.Size=15
Wow it worked!!!
Thank you!!!
just curious..... If I would like also the font to Arial how should it be stated?
Me.Treeview.Font. (?) = Arial ??
charly.csh, i'm glad that amrut was able to help, my main reason for adding to your post was as i said curiosity and to give your post a bump so that maybe my curiosity could betaken care of. I've actually been ask to do something like this but until your post did not think it was possible with access. if you get a chance to view that link it looks pretty good, but very in-depth. do you have a copy of your code that you could post or maybe a sample DB that i could look at?
Glad to help.You are on right track.
Search this forum for SmileyCoder or follow SmileyCoder on Youtube.Code:Me.Treeview.Font.Name = "Arial"
He has very good tutorials for Treeview. He helped me too.
https://www.accessforums.net/showthread.php?t=48400
Sure vicaccess
Glad also to help, in fact I stated the code since the begining of load
************************************************** ***************+
Private Sub Form_Load()
'Call loadTreeview
Me.TreeReqs.Font.Size = 10
Me.TreeReqs.Font.Name = "Arial"
End Sub
************************************************** *********
The property for color I added into an event in my form to change the color depending of the type of node
Private Sub addChildren(tv As TreeView, nodParent As Node, rsReqs As DAO.Recordset, lngParentID As Long)
Dim strFind As String
strFind = "ID_Parent=" & lngParentID
rsReqs.FindFirst strFind
Dim nodX As Node
Dim strBook As String
Do While Not rsReqs.NoMatch
Set nodX = tv.Nodes.Add(nodParent, tvwChild, genReqNodeID(rsReqs!PK_Req), rsReqs!mem_Req)
'*************SELECT CASE FOR COLOR********************
Select Case rsReqs!ID_Type
Case 1 'Document
nodX.Image = "Document"
Case 2 'Header
nodX.Bold = True
nodX.Image = "Header"
Case 3 'Requirement
nodX.Image = "Requirement"
Case 4 'Guide
nodX.ForeColor = vbBlue
nodX.Image = "Guide"
End Select
'************************************************* *********************************
strBook = rsReqs.Bookmark
addChildren tv, nodX, rsReqs, rsReqs!PK_Req
rsReqs.Bookmark = strBook
rsReqs.FindNext strFind
Loop
End Sub
*****************************
I hope this part help
In fact the main idea I got from a 6 videos series in youtube
https://www.youtube.com/watch?v=M5Kq...1l-vaOPGz3BLR8