 |
 |

06-05-2003, 05:20 AM
|
|
Regular
|
|
Join Date: Jun 2003
Location: Holland
Posts: 48
|
|
Treeview
|
Hello all,
Does sombody now how to multiselect in a treeview? By a listview i can set the property multiselect= true, but i can't find a property for a treeview.
I use common controls (SP6).
Thanks!
|
|

06-05-2003, 05:40 AM
|
|
Junior Contributor
|
|
Join Date: Mar 2003
Posts: 299
|
|
|
The only way I see right off hand to identify multiple items of interest would be to use the checkboxes.
|
__________________
NAVigation Electronics Technician 1st class Submarine Service
--------------------in case you were wondering--------------------
|

06-05-2003, 06:08 AM
|
|
Regular
|
|
Join Date: Jun 2003
Location: Holland
Posts: 48
|
|
treeview
Quote: Originally Posted by navet1ss The only way I see right off hand to identify multiple items of interest would be to use the checkboxes.
Thanks for the fast reply!!
I'll already started on that, but i hoped that maybe there was a posibility. Maybe in the way of highlighting.
|
|

06-05-2003, 08:50 AM
|
 |
Senior Contributor
* Expert *
|
|
Join Date: Jul 2003
Location: Ashby, Leicestershire.
Posts: 967
|
|
try this.
Code:
Private Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const TVS_FULLROWSELECT As Long = &H1000
Private Const GWL_STYLE As Long = -16
Private Sub Command1_Click()
Dim lng As Long
lng = GetWindowLong(TreeView1.hwnd, GWL_STYLE)
lng = lng Or TVS_FULLROWSELECT
SetWindowLong TreeView1.hwnd, GWL_STYLE, lng
End Sub
|
__________________
~~ please don't PM me regarding code, I only reply to personnal messages ~~
|

06-06-2003, 02:39 AM
|
|
Regular
|
|
Join Date: Jun 2003
Location: Holland
Posts: 48
|
|
treeview
Quote: Originally Posted by dynamic_sysop try this.
Code:
Private Declare Function GetWindowLong Lib "user32.dll" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32.dll" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Const TVS_FULLROWSELECT As Long = &H1000
Private Const GWL_STYLE As Long = -16
Private Sub Command1_Click()
Dim lng As Long
lng = GetWindowLong(TreeView1.hwnd, GWL_STYLE)
lng = lng Or TVS_FULLROWSELECT
SetWindowLong TreeView1.hwnd, GWL_STYLE, lng
End Sub
I'll have try't, but nothing seem to happen. I'll think it only sets the property fullrowselect = true. That means that a row completely will be highlighted.
But it was a try. Thanks!!
I use now checking the rows. It's fine, but a litle bit anoying.
|
|

06-06-2003, 07:10 AM
|
|
Newcomer
|
|
Join Date: May 2003
Location: Australia
Posts: 1
|
|
Quote: Originally Posted by Fredt Hello all,
Does sombody now how to multiselect in a treeview? By a listview i can set the property multiselect= true, but i can't find a property for a treeview.
I use common controls (SP6).
Thanks!
Multiselect is not a normal function of the TreeView control. However it can be done but requires custom implementation.
I have spent the time to implement this feature. It's quite a bit of code. I've also implemented Disabled Nodes that will also work with the MultiSelect feature.
Source code for wrapper class/DLL, 8 x Tutorials + 1 x Demo application, & Html Help are all included in the attached zip.
Alot of other questions should also be answered with regards to the TreeView control. Make sure that you look at the Read Me First in the help section before using it.
Hope this helps!
|
Last edited by GraGra33; 06-06-2003 at 09:57 AM.
|

06-08-2003, 03:48 AM
|
|
Regular
|
|
Join Date: Jun 2003
Location: Holland
Posts: 48
|
|
treeview attached zip
Quote: Originally Posted by GraGra33
Quote: Originally Posted by Fredt Hello all,
Does sombody now how to multiselect in a treeview? By a listview i can set the property multiselect= true, but i can't find a property for a treeview.
I use common controls (SP6).
Thanks!
Multiselect is not a normal function of the TreeView control. However it can be done but requires custom implementation.
I have spent the time to implement this feature. It's quite a bit of code. I've also implemented Disabled Nodes that will also work with the MultiSelect feature.
Source code for wrapper class/DLL, 8 x Tutorials + 1 x Demo application, & Html Help are all included in the attached zip.
Alot of other questions should also be answered with regards to the TreeView control. Make sure that you look at the Read Me First in the help section before using it.
Hope this helps!
Thanks for your help! I only have one suggestion, where is your attached zip? Or can I download it somewhere?
Again thanks!
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
|
|
 |
|