|
For now i got an workaround...
In the beforeExpand Event i add "dummy children" to the Tree (this works, because i know how much children my asyn op. will add). When my asnc op finishes, i delete these dummies and replaye them with the real children. Now the scrollbar is OK. But this workaound is not that nice...It would be better, when the Nodes.add routine would perform the scrollbar check...
Greetings Tobi
|
|
|
|
|
Same problem, something is wrong with vertical scrolling after adding nodes at runtime. Any solutions?
|
|
|
|
|
Looks very great, but I need to add in columns second checkbox.
Is it possible? As far as I understand I can add any Control to the SubItem collection.
So I tried to do this:
Dim Nde As New TreeListNode(Fam.ToString())
With Nde
.SubItems.Add(Fam.Dad.FirstName)
.SubItems.Add(Fam.Dad.MiddleName)
.SubItems.Add(Fam.Dad.Age.ToString())
.SubItems.Add(New CheckBox())
End With
Me.tlvMain.Nodes.Add(Nde)
It didn't work.
Could you give me example how to add checkbox into treelistview column?
|
|
|
|
|
have you found a solution? I also want to add checkboxes. but the subitem only print out "subitem - 1"
|
|
|
|
|
|
Hi!
does anyone have a version with all those changes made?
would be cool to share it with us...
regards,
Achim
p.s. even better if Tosberg provides us with a new updated version
read my lips: NO MORE BUGS!
|
|
|
|
|
while in custom font size if we set it greater than 12 and made it bold then list nodes not completely appear. nodes overlapped and missed some of thier content area behined other nodes.
any solution of this problem.... ?
Arif Sarwar
|
|
|
|
|
Has anyone solved the 'ImageList problem' for this control? As noticed before, it does not work properly. I linked an imagelist with content to the control and gave the nodes an ImageIndex without the expected results...
|
|
|
|
|
I have found one change that enables the use of specified images:
In the file TreeListNode, modify the Sub SetParent in the following way:
Replace the two lines
<br />
Me.ImageIndex = Me.ListView.DefaultImageIndex<br />
Me._SelImageIndex = Me.ListView.DefaultSelectedImageIndex<br />
with these two modified lines:
<br />
If (Me.ImageIndex = -1) Then Me.ImageIndex = Me.ListView.DefaultImageIndex<br />
If (Me._SelImageIndex = -1) Then Me._SelImageIndex = Me.ListView.DefaultSelectedImageIndex<br />
You also need to set an ImageList for the TreeListView Control and set the _ImgIndex and _SelImageIndex Fields (using the constructor with these two extra arguments for example).
The two original code lines always sets the indices to the default indices, the modified lines check if a specific index has been set for the active node and if not sets the default index.
Regards,
Jens Bejer Pedersen
|
|
|
|
|
Hi, good Control, but is there a C# Version of ths easy-to-use Control. There are a few on The Code Project, but many of them are very difficult to use.
Thanks
hullihulli
|
|
|
|
|
|
Ted,
Thank you for the great control. We started using it in our application. I converted your control to C# using an online converter and also fixed a couple of small bugs. I would post the C# version, but not sure how to attach a file to the comment.
|
|
|
|
|
Great component and just saved me a week or two of coding work as this was exactly what I needed. I already started writing my own, but then I realised how much work that really is and made a web search for one...
I noticed some weird behaviour in the column resizing. When you have a lot of columns, say, more than the control can show at one glance, and resize one the columns that you have scroll into vicinity.. poof.. the column headers will be inactive for some distance from the right edge of the control.
A little research on the code showed that the problem lies in _generateHeaderRect sub in ContainerListView.vb file. I changed it to
Me._HeaderRect = New Rectangle(Rect.Left + 2, Rect.Top + 2, Rect.Width - 4, 20)
and it started to work.
Also, it was not possible to resize the rightmost column at all, because the scrollbar did not bring the right edge of column to vicinity. Again a little tuning, this time in _adjustScrollBars sub in TreeListView.vb file:
'SET SOME UNAFFECTED PROPERTIES 0F THE HSCROLL
With Me.HScroll
.Left = Rect.Left + 2
.Top = Rect.Top + Rect.Height - .Height - 2
Try
If (Me.Columns.Count > 0) Then .SmallChange = ColWdths \ Me.Columns.Count Else .SmallChange = 0
Catch ex As Exception
.SmallChange = 0
End Try
.Maximum = ColWdths + 8 '<-- Added eight pixels to see the edge
End With
and -poof- there it goes again.
|
|
|
|
|
Definitely not the end to all other tree list view conrols because of the image list problem. Only thing this ends is my use of it.
|
|
|
|
|
It's pretty good, but their are bugs
|
|
|
|
|
Hi,
how can i scroll to the First Node?
Thanks
|
|
|
|
|
This one is very easy to reproduce. Open the sample application, and copy and paste the populate button. Rename the caption to Clear, double click and paste the following code for the ClickEventHandler:
If TypeOf Me._CurLstVw Is TreeListView Then
CType(Me._CurLstVw, TreeListView).Nodes.Clear()
Else
Me._CurLstVw.Items.Clear()
End If
Run the application, click Populate, then click Clear, now right click anywhere in the TreeListView and it throws an error in _showSelectedItems. It seems to retain a copy of all of the nodes (?) even though the Tree is cleared out and is trying to show them as selected, but this is not valid.
|
|
|
|
|
I tried that, and yes, that's the way it works. But no worries, it can be fixed by modifying _showSelectedItems subroutine in TreeListView.vb file. With this modification the error will be avoided:
Else
Dim TempNode As TreeListNode = Me._FirstSelectedNode
If TempNode IsNot Nothing Then '<-- add this line...
...
Me.EndUpdate()
End If '<-- and this, too.
End If
|
|
|
|
|
Hi,
i want to change the "Editable" property to false so the user can not edit a sub item.
how do i do that??
Thanks,
Ron.
|
|
|
|
|
Hi,
First I will say "NICE JOB" a realy cool controll that I am using now.
My question is how can I set images for different levels. I have noticed that only 2 images are working 'inageindex' and 'selectedimageindex'.
e.g.
-- RootNode
----ChildNode
------ChildNodeItems
I have 6 images, 2 for each level but cannot get any onther image displayed except the 2 default ones..
Mark Lassooij
|
|
|
|
|
Have you already found the solution to this problem?
|
|
|
|
|
No, have not received any feedback yet...
|
|
|
|
|
Firstly, great control Tosberg. Works very well and a good port from C#.
I am using it in a small program that allows a user to see a list of folders then type in a number of sub-folders to move to a pre-defined location. I have three columns in the treeview, the folder name, number of available sub-folders and an editable column to type in the number to move. I have made the first two columns not editable.
I want the user to be able to press the up/down arrow keys to move up/down to the previous node and edit the number to move in that. I have managed to trap the up/down key event in the edit box and the code below is entered (for the key down event).
Friend Sub EditNextRow()
Dim TestNode As TreeListNode = Nothing
TestNode = Me._CurNode.NextSiblingNode
If (TestNode IsNot Nothing AndAlso Not TestNode Is Me._CurNode) Then
Me._CurNode.EndEdit()
Me._CurNode = TestNode
If (MyBase._MultiSelectMode = MultiSelectModes.Single) Then
Me.SelectedItems.Clear()
Me._CurNode.Selected = True
Me._CurNode.Focused = True
** Me.GetItemAt(Me._CurNode.SubItems(1).Bounds.Location).BeginEdit()
End If
Me._showSelectedItems()
Me.Invalidate()
End If
End Sub
My question, at the line marked with the two asterisks (**), how do I get the second sub-item to BeginEdit()? The current code as above starts editing the folder name (first column) rather than the third column.
|
|
|
|
|
Hi,
There is a problem with the column when you double-click on the separator to set the width to be able to see all the items in that column.
A couple of things that need to be done to fix this:
The aMwid parameter in the OnProcessColumnMouseDownItems method needs to be passed ByRef rather than ByVal, i.e.:
Protected Overridable Sub OnProcessColumnMouseDownItems(ByVal aColIndex As Integer, ByRef aTwid As Integer, ByRef aMwid As Integer)
The above change needs to be made in ContainerListView.vb and TreeListView.vb
The second change is in TreeListView.vb in the _autoSetCOlWidth sub:
ElseIf (aColIndex = 0) Then
aTwid = Tools.GetStringWidth(Node.Text.ToUpper, Node.Font) + (Node.Bounds.Left) + 4
(i.e. remove the -Node.RootNode.Bounds.Left).
|
|
|
|
|
Can i do the same in VC++??
|
|
|
|