Hi,
I have a window with 2 listview, added with "Gui, Add, ListView" command
But I only can manage (LV_Add, LV_Delete()...) the last listview that I have created...
How could i choose the listview that I want manage ?
thanks
how TO CHOOSE a listview from severals?
- Masonjar13
- Posts: 1555
- Joined: 20 Jul 2014, 10:16
- Location: Не Россия
- Contact:
Re: how TO CHOOSE a listview from severals?
https://autohotkey.com/docs/commands/Li ... tm#BuiltIn
If the window has more than one ListView control, by default the functions operate upon the one most recently added. To change this, specify Gui, ListView, ListViewName, where ListViewName is the name of the ListView'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 ListView. [v1.1.23+]: A_DefaultListView contains the current setting.
Re: how TO CHOOSE a listview from severals?
thanks friend but, how could I use it if my 2 listview is in the SAME WINDOWMasonjar13 wrote:https://autohotkey.com/docs/commands/Li ... tm#BuiltInIf the window has more than one ListView control, by default the functions operate upon the one most recently added. To change this, specify Gui, ListView, ListViewName, where ListViewName is the name of the ListView'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 ListView. [v1.1.23+]: A_DefaultListView contains the current setting.
Re: how TO CHOOSE a listview from severals?
Code: Select all
WINDOW:
Gui, Add, ListView, vlv1 x12 y100 w480 h470 AltSubmit, 1|1|1|1
Gui, Add, ListView, vlv2 x502 y100 w490 h470 AltSubmit, 2|2|2|2
Gui, Add, Button, x722 y620 w50 h30 vbut10 gnext, >>
Gui, Show, x203 y268 h679 w1007, Ventana
return
next:
{
LV_Delete(), LV1
cantidad=a
producto=b
precio=c
importe=d
LV_Add(lv1, cantidad, producto, precio, importe)
}
return
GuiClose:
ExitApp
ESCAPE::
ExitApp
Re: how TO CHOOSE a listview from severals?
ok, I get it, here is:
WINDOW:
Gui, Add, ListView, vlv1 x12 y100 w480 h470 AltSubmit, 1|1|1|1
Gui, Add, ListView, vlv2 x502 y100 w490 h470 AltSubmit, 2|2|2|2
Gui, Add, Button, x722 y620 w50 h30 vbut10 gnext, >>
Gui, Show, x203 y268 h679 w1007, Ventana
return
next:
{
;listview id
Gui, ListView, LV1
LV_Delete(),
cantidad=a
producto=b
precio=c
importe=d
LV_Add("", cantidad, producto, precio, importe)
}
return
GuiClose:
ExitApp
ESCAPE::
ExitApp
WINDOW:
Gui, Add, ListView, vlv1 x12 y100 w480 h470 AltSubmit, 1|1|1|1
Gui, Add, ListView, vlv2 x502 y100 w490 h470 AltSubmit, 2|2|2|2
Gui, Add, Button, x722 y620 w50 h30 vbut10 gnext, >>
Gui, Show, x203 y268 h679 w1007, Ventana
return
next:
{
;listview id
Gui, ListView, LV1
LV_Delete(),
cantidad=a
producto=b
precio=c
importe=d
LV_Add("", cantidad, producto, precio, importe)
}
return
GuiClose:
ExitApp
ESCAPE::
ExitApp