 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
kdoske
Joined: 17 Dec 2008 Posts: 80
|
Posted: Sun Nov 15, 2009 5:58 pm Post subject: 2 Gui's, 2 Listviews, ClassNN is SysListView321 on both list |
|
|
I have run into a strange problem. I have a GUI 1 and a GUI 2. Each Gui needs a list view on it. However when I create them, both GUI's listview have the exact same ClassNN, SysListView321. How can I toggle over to each and edit them. The code below is based on this post but his listview are all in one GUI.
http://www.autohotkey.com/forum/topic50747.html&highlight=multiple+listview
I assumed by chaning 'Gui, Listview, SysListView321' to 'Gui, 2:Listview, SysListView321' it would fix the problem but that is not the case. The Listview commands still edit the Listview on GUI 1.
| Code: | find:
gui, 2:+owner1
Gui, 2:Add, ListView, r10 x10 w550 gMyListView2 Checked, blah, blah, blah, blah, blah, blah
Gui, 2:Show
Gui, 2:Listview, SysListView321
LV_ModifyCol(1, 200)
LV_ModifyCol(2, 25)
LV_ModifyCol(3, 200)
LV_ModifyCol(4, 50)
LV_ModifyCol(5, 200)
LV_ModifyCol(6, 55)
LV_ModifyCol(4, "Integer") ; For sorting purposes, indicate that column 2 is an integer.
LV_Delete() ;clears current
|
Any help would be appreciated |
|
| Back to top |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 4652 Location: AHK Forum
|
Posted: Sun Nov 15, 2009 7:22 pm Post subject: |
|
|
| Code: | Loop 2
Gui,%A_Index%:Add,ListView,% "w200 vSYSTAB" A_Index,Test
Loop 2
{
Gui,%A_Index%:Default
Gui,ListView,SYSTAB%A_Index% ;or Gui,ListView,SysListView321
LV_Add("",A_Index)
}
Loop 2
Gui,%A_Index%:Show,% "x" (A_Index-1)*300
Return
GuiClose:
2GuiClose:
ExitApp |
_________________ AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun  |
|
| Back to top |
|
 |
svi
Joined: 09 Oct 2006 Posts: 236 Location: Finland
|
Posted: Sun Nov 15, 2009 7:57 pm Post subject: |
|
|
| The Manual wrote: | | All of the ListView functions operate upon the current thread's default GUI window (which can be changed via Gui, 2:Default). |
Associated variable isn't sufficient (or needed for this) as HotKeyIt also demonstrated: | Quote: | | Code: | | Gui,ListView,SYSTAB%A_Index% ;or Gui,ListView,SysListView321 |
|
_________________ Pekka Vartto |
|
| Back to top |
|
 |
kdoske
Joined: 17 Dec 2008 Posts: 80
|
Posted: Sun Nov 15, 2009 8:39 pm Post subject: |
|
|
[quote="svi"] | The Manual wrote: | | All of the ListView functions operate upon the current thread's default GUI window (which can be changed via Gui, 2:Default). |
Thanks SVI. Designating GUI2 as default did the trick. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|