MISIIM Posted August 9, 2007 Share Posted August 9, 2007 I am writing a file manager and have a tab control. I have a function that adds a tab with a listbox to the tab set. However the listbox is not put into the tab, but the main window. How do I make it go into the tab? GUICtrlCreateTabItem($dir); Local $lv = GUICtrlCreateListView("Filename|File Size|Date Modified", 0, 0, 749, 500, Default, $LVS_EX_FULLROWSELECT); GUICtrlSendMsg($lv, $LVM_SETCOLUMNWIDTH, 0, 500); _ArrayAdd($listViews, $lv); GUICtrlCreateTabItem(""); Link to comment Share on other sites More sharing options...
martin Posted August 9, 2007 Share Posted August 9, 2007 I am writing a file manager and have a tab control. I have a function that adds a tab with a listbox to the tab set. However the listbox is not put into the tab, but the main window. How do I make it go into the tab? GUICtrlCreateTabItem($dir); Local $lv = GUICtrlCreateListView("Filename|File Size|Date Modified", 0, 0, 749, 500, Default, $LVS_EX_FULLROWSELECT); GUICtrlSendMsg($lv, $LVM_SETCOLUMNWIDTH, 0, 500); _ArrayAdd($listViews, $lv); GUICtrlCreateTabItem(""); I think the problem is that you need to set the coords of the list view to be inside the tab. Try 50,50 instead of 0,0. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Zedna Posted August 9, 2007 Share Posted August 9, 2007 This works fine: #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 633, 454, 193, 115) $Tab1 = GUICtrlCreateTab(72, 16, 497, 369) $TabSheet1 = GUICtrlCreateTabItem("TabSheet1") $ListView1 = GUICtrlCreateListView("", 96, 56, 290, 230) $TabSheet2 = GUICtrlCreateTabItem("TabSheet2") GUICtrlSetState(-1,$GUI_SHOW) $ListView2 = GUICtrlCreateListView("", 96, 56, 450, 302) GUICtrlCreateTabItem("") $Button1 = GUICtrlCreateButton("Button1", 216, 408, 75, 25, 0) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 $TabSheet3 = GUICtrlCreateTabItem("TabSheet3") GUICtrlSetState(-1,$GUI_SHOW) $ListView3 = GUICtrlCreateListView("", 96, 56, 450, 302) GUICtrlCreateTabItem("") EndSwitch WEnd Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
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