faustf Posted May 27, 2013 Share Posted May 27, 2013 hi gut i have little proble i have created a script with 2 tabsheet . in first tabsheet i have created a list view , when i clik one button i want destroy list view and recreate i use this code _GUICtrlListView_Destroy($List1AC) $List1AC = GUICtrlCreateListView("Nome o Ditta|Mail|Telefono|Cell|Indirizzo|Città|Fax|Cod.DB", 501, 76, 545, 409, $LVS_EX_GRIDLINES) _GUICtrlListView_SetExtendedListViewStyle($List1AC, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_GRIDLINES,$LVS_EX_CHECKBOXES, $LVS_EX_SUBITEMIMAGES)) ; questa stringa fa la griglia stile excel GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 100) ; nome ditta GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 100) ; mail GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 80) ; telefono GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 3, 80) ; cell GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 4, 100) ; indirizzo GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 5, 80) ; citta GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 6, 80) ; fax GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 7, 30) ; cod.db and do perfect but if i after clik over tabsheet2 the listview appear also in tabsheet 2 is possible tell at listview only in tabsheet 1 you must appear?? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 27, 2013 Moderators Share Posted May 27, 2013 faustf, You need to use GUISwitch with the tabitemID parameter to get the control onto the correct tab - and do not forget to close the tab definition once you have recreated it. 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 Link to comment Share on other sites More sharing options...
faustf Posted May 27, 2013 Author Share Posted May 27, 2013 o you have example? ? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 27, 2013 Moderators Share Posted May 27, 2013 faustf, Sure: #include <GUIConstantsEx.au3> $hGUI = GUICreate("Test", 500, 500) $cTab = GUICtrlCreateTab(10, 10, 480, 350) $cTab_0 = GUICtrlCreateTabItem("Tab 0") $cTab_1 = GUICtrlCreateTabItem("Tab 1") GUICtrlCreateTabItem("") $cButton = GUICtrlCreateButton("Add to Tab(s)", 10, 450, 80, 30) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit Case $cButton ; This control will only be on Tab 0 GUISwitch($hGUI, $cTab_0) GUICtrlCreateLabel("Only on Tab 0", 40, 40, 200, 20) GUICtrlSetBkColor(-1, 0xCCFFCC) GUICtrlCreateTabItem("") GUISwitch($hGUI) ; But this one will be on both GUICtrlCreateLabel("OnTab 0 AND Tab 1", 40, 100, 200, 20) GUICtrlSetBkColor(-1, 0xFFCCCC) EndSwitch WEnd If you create native controls outside the tab creation structure then they appear on all tabs (as is the case for all UDF-created controls). So you need to use GUISwitch to get the controls into the tab structure if you create them after the tabs have been created. All clear? 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 Link to comment Share on other sites More sharing options...
faustf Posted May 27, 2013 Author Share Posted May 27, 2013 o thankz for example i study Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted May 27, 2013 Moderators Share Posted May 27, 2013 faustf, I have added the example to the Tabs tutorial in the Wiki. 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 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