muXed
New Member
Posts: 15
|
Post by muXed on Nov 25, 2019 14:18:47 GMT -5
Hi guys!
I'm back at it with another listview question.
Is it possible to either delete a listview without destroying the window itself or toggle the visibility?
|
|
|
Post by tsh73 on Nov 25, 2019 15:55:00 GMT -5
No problem
#main.listbox1 "hide"
'Form created with the help of Freeform 3 v07-31-2015 'Generated on Nov 25, 2019 at 23:52:30
[setup.main.Window]
'-----Begin code for #main
nomainwin WindowWidth = 330 WindowHeight = 155 UpperLeftX=int((DisplayWidth-WindowWidth)/2) UpperLeftY=int((DisplayHeight-WindowHeight)/2)
'-----Begin GUI objects code
ListboxColor$ = "white" listbox #main.listbox1, array$(, [listbox1DoubleClick], 5, 5, 100, 100 button #main.button2,"hide listbox",[button2Click], UL, 155, 12, 105, 25 button #main.button3,"show listbox",[button3Click], UL, 155, 47, 105, 25
'-----End GUI objects code
open "untitled" for window as #main print #main, "font ms_sans_serif 10" print #main, "trapclose [quit.main]"
array$(1)="Red" array$(2)="Green" array$(3)="Blue"
#main.listbox1 "reload"
[main.inputLoop] 'wait here for input event wait
[listbox1DoubleClick] 'Perform action for the listbox named 'listbox1'
'Insert your own code here
wait
[button2Click] 'Perform action for the button named 'button2'
#main.listbox1 "hide"
wait
[button3Click] 'Perform action for the button named 'button3'
#main.listbox1 "show"
wait
[quit.main] 'End the program close #main end
|
|
|
Post by metro on Nov 26, 2019 1:07:04 GMT -5
If it's actually a ListView I use calldll #user32, "DestroyWindow", hwndLV as ulong , re as long
Thanks to Alyce for the tip in her book hwndLV is the handle of "my" listview
|
|
muXed
New Member
Posts: 15
|
Post by muXed on Dec 4, 2019 13:45:03 GMT -5
If it's actually a ListView I use calldll #user32, "DestroyWindow", hwndLV as ulong , re as long Thanks to Alyce for the tip in her book hwndLV is the handle of "my" listview Works a charm Metro! Thank you sir!
|
|