Sign in to follow this  
Followers 0
wiredbits

Scrap...treeview hittest

12 posts in this topic

#1 ·  Posted (edited)

HI

I needed a hit test for treeview items and came up with this, included some examples/ideas on use. I am still playing with it so yell if any problems or other ideas on use. Oh also is my first DllStructCreate routine.

Included examples:

right mouse button (secondary) selection of Treeview item

drag and drop child items between parents

drag file onto treeview and if a hit add to treeview

context menu cut, copy, paste, and delete a treeview item

Oh a note on the context menus, I found an example in help file using dummy control and then calling API TrackPopupMenuEx ! Really nice, your able to control context menus on the fly!

Cheers

Jim

Edit..u need beta 1.99 and if you use SciTE you will get an error on @GUI_DRAGFILE just continue with run, I added the key macro to SciTE's api file manually.

TV_Hittest.au3

TV_HittestArrays.au3

Edited by wiredbits

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hello,

it's a great example. Also if it works only partly it shows fine what can be done, with some background knowledge and time for it.

If you go on with this, it would be fine if you continue to publish.

Many thanks, Reinhard

Edited by ReFran

Share this post


Link to post
Share on other sites

Hello,

it's a great example. Also if it works only partly it shows fine what can be done, with some background knowledge and time for it.

If you go on with this, it would be fine if you continue to publish.

Many thanks, Reinhard

Hi

I tried to keep examples as general as possible, I assumed most users would modify code to suit their needs. It was a lot of fun just playing around with the code, I could have made it more friendly for OnEvent mode....might go back and change a few things.

Thanks

Jim

Share this post


Link to post
Share on other sites

Hi

Revised code, went back to hiding control during scroll while draging child treeview item.

Did an array example which is more OnEvent friendly, added auto expand/collaspe parents in this example. Might add save/read Ini to array example.

Jim

Share this post


Link to post
Share on other sites

Hi

Revised code, went back to hiding control during scroll while draging child treeview item.

Did an array example which is more OnEvent friendly, added auto expand/collaspe parents in this example. Might add save/read Ini to array example.

Jim

I'm looking for a way to search a dynamicaly created treeview (without having to click on an item or write the treeview to a file)

since you wrote this UDF, i was wondering if you would have any insight on if it's possible to do what i need?

thanks

Share this post


Link to post
Share on other sites

I'm looking for a way to search a dynamicaly created treeview (without having to click on an item or write the treeview to a file)

since you wrote this UDF, i was wondering if you would have any insight on if it's possible to do what i need?

thanks

Hi

Take a look at he array example, thats is one way to track treeviews. Once Treeview and treeview array has been created you can just loop through array and search.

Was this what meant?

Jim

Share this post


Link to post
Share on other sites

Hi

Take a look at he array example, thats is one way to track treeviews. Once Treeview and treeview array has been created you can just loop through array and search.

Was this what meant?

Jim

Looks you are good with Treeviews (nice example) then i would ask: do you know a way to capture a DoubleClick on an item ? :think:

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

wiredbits,

I think that this is the nicest solution that I have found. I hope that I will be able to use it for my needs.

My needs are

1) Add items parent or chiled manually.

2) Rename parent or child objects.

3) Adding for each level a different icons.

4) What about mouse click command?

Any help to make this UDF better ???

Thanks for posting this

Edited by lsakizada

Be Green Now or Never (BGNN)!

Share this post


Link to post
Share on other sites

wiredbits,

I think that this is the nicest solution that I have found. I hope that I will be able to use it for my needs.

My needs are

1) Add items parent or chiled manually.

2) Rename parent or child objects.

3) Adding for each level a different icons.

4) What about mouse click command?

Any help to make this UDF better ???

Thanks for posting this

Might want to take a look at the TreeView module in Auto3Lib. It does all the things that you listed (and quite a bit more) :whistle:

Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Might want to take a look at the TreeView module in Auto3Lib. It does all the things that you listed (and quite a bit more) :P

Thanks PaulIA , This library looks impressive!!!

Look like I will have to spend some time to learn it.

:whistle:

Edited by lsakizada

Be Green Now or Never (BGNN)!

Share this post


Link to post
Share on other sites

Thanks PaulIA , This library looks impressive!!!

Look like I will have to spend some time to learn it.

:whistle:

Start with the TreeView demos and the work up from there. If you get stuck, feel free to drop me a line in the Auto3Lib thread in the Examples forum.

Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites

This code doesn't seem to work with the latest build. Any updates to this? I'm not smart enough to figure out what's wrong other than it looks like most of the constants have been put into their own au3 file by now.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0