Multiple treeview in one Gui

Get help with using AutoHotkey and its commands and hotkeys
maher
Posts: 5
Joined: 22 Jun 2018, 10:55

Multiple treeview in one Gui

12 Jul 2018, 03:33

I have a gui with multiple treeview.
I am having problems with TV_getselect(). I read somewhere in the forum that if there are more than one treeview in the gui and a selection is made in the first treeview, Tv_getselect() returns 0.

Is this true and is there a way around it ?

Many thanks in advance.
just me
Posts: 5457
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: Multiple treeview in one Gui

12 Jul 2018, 05:38

Built-in Functions for TreeViews wrote:All of the TreeView functions operate upon the current thread's default GUI window (which can be changed via Gui, 2:Default). If the default window does not exist or has no TreeView controls, all functions return zero to indicate the problem.

If the window has more than one TreeView control, by default the functions operate upon the one most recently added. To change this, specify Gui, TreeView, TreeViewName, where TreeViewName is the name of the TreeView's associated variable, its ClassNN as shown by Window Spy or [in v1.1.04+] its HWND. Once changed, all existing and future threads will use the indicated TreeView. [v1.1.23+]: A_DefaultTreeView contains the current setting.
maher
Posts: 5
Joined: 22 Jun 2018, 10:55

Re: Multiple treeview in one Gui

12 Jul 2018, 05:49

How do you specify the treeview when using TV_getselect() ?
maher
Posts: 5
Joined: 22 Jun 2018, 10:55

Re: Multiple treeview in one Gui

12 Jul 2018, 11:44

Sorry .. I get it .. I have to use the line before using the built in functions

Return to “Ask For Help”

Who is online

Users browsing this forum: chngrcn, ichabod165, Scoox, SOTE, swagfag and 93 guests