Jump to content

Recommended Posts

Posted (edited)

Hello Community,

I decided to release this collection of functions to create a Treeview browser as a standalone product because I hope to get some input for further improvements this way (esp. Vista and Win7 compatibility, as I don't have these OS installed). I utilize them in both my programs AMT and SMF (see sig).

ShellTristateTreeView

v39, 2010-Aug-14

post-40098-12486965353887_thumb.jpg

For sure the code itself is really dirty (e.g. the WM_NOTIFY needs unification), breaks any convention, and contains enough useless variables etc. pp...

But I'll be happy about any help offered to clean up this quiet complex piece of code and to learn ways to further improve these functions and to share them with the community >_< ...

Kudos to Holger Kotsch and R.Gilman (a.k.a. rasim) for (large) parts of the code, if you find portions written by yourself please let me know so that I can add you to the Kudos list :( ...

2009-Jul-27, v27

2010-Aug-14, v39

Regards

ShellTristateTreeView_v27.zip

ShellTristateTreeView_v39.zip

Edited by KaFu
  • 1 year later...
Posted

Thanks for the nice feedback :P. Hmmm, my most recent version I use for SMF is v38 :blink:, but that's heavily in-cooperated into SMF. When the next release of that one is finished, I'll extract the relevant code and do an update to this one as well ;)...

Posted (edited)

..having some trouble with running the example file. :blink:

When I run ShellTriStateTreeView_v27_Example it tells me that $TVM_GETITEM and $TVM_SETITEM are not declared. I added "Global $TVM_GetItem, $TVM_SetItem" but when I do that it won't go to the next screen and display the directories/files that I selected.

Any help would be appreciated. ;)

Edited by sliceofpie
Posted
Posted

I'm looking to display multiple variables i.e. each folder that is checked.

When I use the example below:

MsgBox(0, "", $aTreeViewItemState[0][0] & @CRLF & $aTreeViewItemState[0][0])

it returns the first directory twice. How can I display every directory that is checked?

  • 2 weeks later...
Posted (edited)

When I run the Treeview browser, it creates a list of the folders I've selected and saves it to the ShellTristateTreeView.ini file. When I close the program and reopen, it will give me an error message "Array variable has incorrect number of subscripts or subscript dimension range exceeded." and I have to delete the .ini file in order for it to rerun. :)

The only time this doesn't happen is if I select the C:\ drive only.

;)

Edited by sliceofpie
Posted

The child item does not exit until the tree-branch is expanded, I just check if there is at least one sub-item to add the +. On creation there should be a test if the parent is checked... which isn't currently there ;). Expand a tree, then collapse it again and you will see that the child items will be checked if they already exist.

I'll add it, but thats more a cosmetic thing. It won't change anything in the resulting array, because if the parent is checked the child items will not be returned at all.

  • 2 weeks later...
  • 3 weeks later...
Posted

I'm trying to integrate the ShellTristateTreeView sample in a tab control. The problem is that treeview list shows up in every tab. Here's a sample of what I'd like to do.

GUICtrlCreateTab(1, 1, 305, 353)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
GUICtrlCreateTabItem("Tab1")

$c_TreeView_LocationFilter = _GUICtrlTreeView_Create($hGUI, 10, 30, 220, 280, BitOR($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_CHECKBOXES, $TVS_NOTOOLTIPS), $WS_EX_CLIENTEDGE)

GUICtrlCreateTabItem("Tab2")

GUICtrlCreateTabItem("")

GUISetState(@SW_SHOW)
Posted

I'm trying to integrate the ShellTristateTreeView sample in a tab control. The problem is that treeview list shows up in every tab. Here's a sample of what I'd like to do.

I end up using GUICtrlCreateTreeView instead of _GUICtrlTreeView_Create followed by GUICtrlGetHandle. This seems to be working.

Here's the link for the post:

http://www.autoitscript.com/forum/index.php?showtopic=56751&st=0&p=430278&hl=%20_GUICtrlTreeView_Create%20%20tab&fromsearch=1&#entry430278

  • 8 months later...
Posted

Hiho, it's part of the SMF source, there it's currently v43. As SMF is compiled only as 32bit (due to supporting 32bit dll's), I've never looked into the 64bit issue. But I assume it has to do with the dllstructure definitions used... oh, I see, and I use _ArraySortClib(), it's a machine-code function for very fast array sorting and sadly bound to 32bit, would need replacement too if the overall function should work on 64bit. Sorry, currently I'm not planning to implement compatibility.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...