coolboy2295 Posted July 15, 2012 Posted July 15, 2012 (edited) I have create tab 1 and 2. On tab 1 have button1 to create a list view on tab 2 and many list view item. The List view flash up continuously(@e1). And when turn into tab2 the button on tab1 still visible(@e2). (@e2) i use guisetstate. (@e1) i plan is create listview invisible. And I don't know how to do that. Any one help me which 2 this problem. Thanks Opt("guioneventmode", 1) HotKeySet("{ESC}","_exit") Local $hgui = GUICreate("", 800, 560, 50, 50,BitOR(0x00020000,0x00C00000,0x80000000,0x00080000,0x00040000));$WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU,$WS_SIZEBOX GUICtrlCreateTab(10, 10, 780, 271, 0x0400, 0x00000001);$TCS_FIXEDWIDTH, $TCS_SCROLLOPPOSITE Local $tab1_1=GUICtrlCreateTabItem("------") $label1=GUICtrlCreateLabel("Big text...........................................",20,40,200,250) GUICtrlSetFont(-1,60) $label2=GUICtrlCreateLabel("Big text...........................................",250,40,200,250) GUICtrlSetFont(-1,60) $list3=GUICtrlCreateListView("3|4|5",500,40,200,250) Local $tab1_2=GUICtrlCreateTabItem("++++++") Local $list1 = GUICtrlCreateListView("a|b|c", 20, 40, 260, 225) Local $list2 = GUICtrlCreateListView("1|2|3", 300, 40, 260, 225) GUICtrlCreateTabItem("") GUISetState() While 1 GUICtrlCreateListViewItem(Random()&"|"&Random()&"|"&Random(),$list1) GUICtrlCreateListViewItem(Random()&"|"&Random()&"|"&Random(),$list2) GUICtrlCreateListViewItem(Random()&"|"&Random()&"|"&Random(),$list3) WEnd Func _exit() Exit EndFunc ;==>guievent Edited July 15, 2012 by coolboy2295
Zedna Posted July 15, 2012 Posted July 15, 2012 Small reproducing script is missing ... Resources UDF ResourcesEx UDF AutoIt Forum Search
coolboy2295 Posted July 15, 2012 Author Posted July 15, 2012 Can you help me with the script. Just put some small code.
Moderators Melba23 Posted July 15, 2012 Moderators Posted July 15, 2012 coolboy2295, You misunderstand - you need to provide us with some code which shows your problem. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
coolboy2295 Posted July 15, 2012 Author Posted July 15, 2012 Sorry I have up my script. It flash and in my program it flash more than that a lot. When move to the second tab some time the label from the first tab is still visible
Moderators Melba23 Posted July 15, 2012 Moderators Posted July 15, 2012 coolboy2295,Creating that many ListViewItems that quickly will always cause flashing as the GUI is redrawn faster then the screen refresh rate. Where is this "button1 to create a list view on tab 2" and with what exactly are you filling the ListViews? If we have an idea of what you are trying to do we can perhaps offer some solutions. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
coolboy2295 Posted July 16, 2012 Author Posted July 16, 2012 The button is just my example. My list view contain history of program so there is a lot when load the history. I wonder can we create a listview and create items before put to the gui. Or is that problem solve when put list view in child gui is invisible. I don't know but I cann't see the child gui on the second tab even when it is show. The tab is hide the child gui i think. Or can we move the listview to the other position out of gui and load the history. Which one is better. I have not tried or the way yet just my think. But the child gui can not show on the tab is true. Thanks Is there another better way.
Crayfish Posted July 16, 2012 Posted July 16, 2012 (edited) I fixed your script. You declare random stuff and call while func infinitely on the list view. (Do you want to fill the list view endlessly?) HotKeySet("{ESC}","_exit") #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <TabConstants.au3> $hgui = GUICreate("", 800, 560, 50, 50,BitOR(0x00020000,0x00C00000,0x80000000,0x00080000,0x00040000));$WS_MINIMIZEBOX, $WS_CAPTION, $WS_POPUP, $WS_SYSMENU,$WS_SIZEBOX $PageControl1 = GUICtrlCreateTab(10, 10, 780, 271, 0x0400, 0x00000001);$TCS_FIXEDWIDTH, $TCS_SCROLLOPPOSITE $tab1_1=GUICtrlCreateTabItem("------") $label1=GUICtrlCreateLabel("Big text...........................................",20,40,200,250) GUICtrlSetFont(-1,60) $label2=GUICtrlCreateLabel("Big text...........................................",250,40,200,250) GUICtrlSetFont(-1,60) $list3=GUICtrlCreateListView("3|4|5",500,40,200,250) GUICtrlCreateListViewItem(Random()&"|"&Random()&"|"&Random(),$list3) $tab1_2=GUICtrlCreateTabItem("++++++") $list1 = GUICtrlCreateListView("a|b|c", 20, 40, 260, 225) GUICtrlCreateListViewItem(Random()&"|"&Random()&"|"&Random(),$list1) $list2 = GUICtrlCreateListView("1|2|3", 300, 40, 260, 225) GUICtrlCreateListViewItem(Random()&"|"&Random()&"|"&Random(),$list2) GUICtrlCreateTabItem("") GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited July 16, 2012 by Crayfish
coolboy2295 Posted July 16, 2012 Author Posted July 16, 2012 You can't fix like that this my example to make it create a lot of item and it will make gui flash. In my program some time it will load history and it is cause flash gui.
Crayfish Posted July 16, 2012 Posted July 16, 2012 I see so you want the gui to flash sporadically. $GUI_HIDE to hide the listview.
coolboy2295 Posted July 16, 2012 Author Posted July 16, 2012 I have tried the gui hide but it not work. Thanks
Crayfish Posted July 16, 2012 Posted July 16, 2012 (edited) It work for me. You set your listview to go to infinity so it is base on your CPU to run this shit until memory run out. Catatonic spasm! This is bad practice. Hide would not work under this case because before thread can hide the GUI it already got flood by next listview input. Edited July 16, 2012 by Crayfish
coolboy2295 Posted July 16, 2012 Author Posted July 16, 2012 In this example it work but in my program it still flash.
coolboy2295 Posted July 16, 2012 Author Posted July 16, 2012 I use guictrlsetpos and it work. Thanks all you guys
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