|
I have added a imagelist to my treelistview. toplevel nodes get a imageindex 0, second level nodes get imageindex 1 and third level nodes get imageindex 2. there are 3 images in the imagelist. but secondlevel nodes were drawn without an image.
have I forgot to set any property?
|
|
|
|
|
column header are drawn with 2 or 3 pixels margin.
scrollbars both vertical and horizontal have a 2 pixel marin.
what is the intention?
|
|
|
|
|
Hi,
i try to add Childnodes dynamically to my Tree at the BeforeExpand Event. In this Event i start an asynchonous operation, which adds the children (after the eventhandler ended). Then the tree begins to expand and my async function adds the children. But the problem is with this, that no vertical scrollbar is added even if one is needed Is there a trick to tell the control to recalculate the need of an scrollbar? The Node.add operation seems not to perform this check.
Thank you for your Ideas.
Tobi
modified on Friday, May 22, 2009 6:54 PM
|
|
|
|
|
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...
|
|
|
|