Jump to content

List view and Tab problem


Recommended Posts

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 by coolboy2295
Link to comment
Share on other sites

  • Moderators

coolboy2295,

You misunderstand - you need to provide us with some code which shows your problem. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Moderators

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Crayfish
Link to comment
Share on other sites

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 by Crayfish
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...