#include <GUIConstantsEx.au3> #include <GuiListView.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> $WinTitle = "whatever" $MainGUI = GUICreate($WinTitle, 995, 765) $TabControl = GUICtrlCreateTab (0,0,995,750) $Tab = GUICtrlCreateTabItem ("Progect Managment") $SearchAll = GUICtrlCreateButton(" Display all available projects", 10, 330, 480, 35) $Results = _GUICtrlListView_Create($MainGUI, "1_________|2|3", 505, 20, 480, 325, BitOR($LVS_REPORT, $LVS_SINGLESEL, $LVS_SHOWSELALWAYS, $WS_BORDER)) $iExStyle = $LVS_EX_DOUBLEBUFFER _GUICtrlListView_SetExtendedListViewStyle($Results, $iExStyle, $iExStyle) GUICtrlCreateTabItem("Next Tab...") GUICtrlCreateTabItem("One More...") GUICtrlCreateTabItem("Etc...") GUICtrlCreateTabItem("") GUISetState(@SW_SHOW, $MainGUI) Local $GUIGetMsg While 1 ;Main Loop $GUIGetMsg = GUIGetMsg() Switch $GUIGetMsg Case $GUI_EVENT_CLOSE ExitLoop Case $SearchAll _GUICtrlListView_BeginUpdate($Results) for $i = 1 to 1000 Step 1 _GUICtrlListView_AddItem($Results, "test" & $i) Next _GUICtrlListView_EndUpdate($Results) Case $TabControl Switch GUICtrlRead($TabControl) Case 0 ; project management _WinAPI_ShowWindow($Results, @SW_SHOW) Case Else ; other tabs _WinAPI_ShowWindow($Results, @SW_HIDE) EndSwitch EndSwitch WEnd
Built-in ListView controls are a PITA. Well so are user controlled ones, but offer much more flexibility. I'm not ever sure Begin/EndUpdate() work on built-in listviews.
Edited by wraithdu, 28 October 2011 - 02:51 PM.





