Zaxon Posted February 18, 2005 Posted February 18, 2005 (edited) I'm finding that if I create a list view, then create a new gui window to do something, close the newly created window taking you back to the original gui, that I can't update the list view. Need an example?Consider the following sample code:; create main windowGUICreate ("title")$id=GUICtrlCreateListView ("list",5,5)GUICtrlCreateListViewItem("test",$id)GUISetState()GUICtrlCreateListViewItem("I'm added",$id)sleep(5000)Produces a simple list box. Note the second list entry - I'm added.Look at the same code, but this time we'll open a new gui window, close it, and then try added the second line.; create main windowGUICreate ("title")$id=GUICtrlCreateListView ("list",5,5)GUICtrlCreateListViewItem("test",$id)GUISetState(); create secondary window$h=GUICreate ("title")GUISetState()sleep(1000)guidelete($h); back to main windowGUICtrlCreateListViewItem("I'm added",$id)sleep(5000)What's happening here? What causes the original list view, which I have the id for, to not be extendible? Edited February 18, 2005 by Zaxon
jpm Posted February 18, 2005 Posted February 18, 2005 I'm finding that if I create a list view, then create a new gui window to do something, close the newly created window taking you back to the original gui, that I can't update the list view. Need an example?Consider the following sample code:; create main windowGUICreate ("title")$id=GUICtrlCreateListView ("list",5,5)GUICtrlCreateListViewItem("test",$id)GUISetState()GUICtrlCreateListViewItem("I'm added",$id)sleep(5000)Produces a simple list box. Note the second list entry - I'm added.Look at the same code, but this time we'll open a new gui window, close it, and then try added the second line.; create main windowGUICreate ("title")$id=GUICtrlCreateListView ("list",5,5)GUICtrlCreateListViewItem("test",$id)GUISetState(); create secondary window$h=GUICreate ("title")GUISetState()sleep(1000)guidelete($h); back to main windowGUICtrlCreateListViewItem("I'm added",$id)sleep(5000)What's happening here? What causes the original list view, which I have the id for, to not be extendible?<{POST_SNAPBACK}>in my mind there is no reason why a GuiSwitch($main) would be needed before calling for addition but the following solve your problem. I have a look this weekend why ; create main window $main=GUICreate ("title") $id=GUICtrlCreateListView ("list",5,5) GUICtrlCreateListViewItem("test",$id) GUISetState() ; create secondary window $h=GUICreate ("title") GUISetState() sleep(1000) guidelete($h) GuiSwitch($main) ; back to main window GUICtrlCreateListViewItem("I'm added",$id) sleep(5000)
Zaxon Posted February 18, 2005 Author Posted February 18, 2005 in my mind there is no reason why a GuiSwitch($main) would be needed before calling for addition but the following solve your problem.<{POST_SNAPBACK}>Agreed.Your solution works! Thanks for that, jpm
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now