mnaboud76 Posted September 14, 2017 Share Posted September 14, 2017 how I can macke subitem belong to Item in listview and I need appear or disappear this subitem. thank you Link to comment Share on other sites More sharing options...
careca Posted September 14, 2017 Share Posted September 14, 2017 When i think about a subitem, i think about the item in the columns to the right. So for me, what you're saying is that you need to be able to hide / show the columns to the right of the first item. Is that what you mean? If it is, im not sure i can help. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
mnaboud76 Posted September 14, 2017 Author Share Posted September 14, 2017 I need to be able to hise / show this 2 Rows (item 4.1 and item 4.2) when i click of arrow and the information in this 2 rows belongs to item 4 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 14, 2017 Moderators Share Posted September 14, 2017 First off, is this in a listview you have created, or an external application? If it is something you created, how about showing your code? If it is external, what is the app? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
mnaboud76 Posted September 14, 2017 Author Share Posted September 14, 2017 (edited) expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <Constants.au3> #include <Array.au3> #include <GuiListView.au3> #include <WindowsConstants.au3> Example() Func Example() Local $listview, $button, $item1, $item2, $item3, $msg GUICreate("listview items", 220, 250, 100, 200, -1, $WS_EX_ACCEPTFILES) GUISetBkColor(0x00E0FFFF) ; will change background color Local $aArray1[4][3] For $i = 0 To 3 For $j = 0 to 2 $aArray1[$i][$j] = ($i+1)+ ($j+1) Next Next _ArrayDisplay($aArray1 , "$aArray1") $idListviewP = GUICtrlCreateListView("", 10, 10, 200, 150,-1, $WS_EX_CLIENTEDGE) $button = GUICtrlCreateButton("Value?", 75, 170, 70, 20) _GUICtrlListView_InsertColumn($idListviewP, 0, "", 50) _GUICtrlListView_InsertColumn($idListviewP, 1, "Col1", 50) _GUICtrlListView_InsertColumn($idListviewP, 2, "Col2", 50) _GUICtrlListView_InsertColumn($idListviewP, 3, "Col3", 50) Local $ValueRow0 = "|" , $ValueRow1 = "|" , $ValueRow2 = "|" , $ValueRow3 = "|" For $i = 0 To 3 For $j = 0 to 2 if $i == 0 Then If $j < 2 Then $ValueRow0 &= $aArray1[$i][$j] & "|" Else $ValueRow0 &= $aArray1[$i][$j] EndIf EndIf if $i == 1 Then If $j < 2 Then $ValueRow1 &= $aArray1[$i][$j] & "|" Else $ValueRow1 &= $aArray1[$i][$j] EndIf EndIf if $i == 2 Then If $j < 2 Then $ValueRow2 &= $aArray1[$i][$j] & "|" Else $ValueRow2 &= $aArray1[$i][$j] EndIf EndIf if $i == 3 Then If $j < 2 Then $ValueRow3 &= $aArray1[$i][$j] & "|" Else $ValueRow3 &= $aArray1[$i][$j] EndIf EndIf Next Next $item1 = GUICtrlCreateListViewItem($ValueRow0, $idListviewP) $item2 = GUICtrlCreateListViewItem($ValueRow1, $idListviewP) $item3 = GUICtrlCreateListViewItem($ValueRow2, $idListviewP) $item4 = GUICtrlCreateListViewItem($ValueRow3, $idListviewP) $item41 = _GUICtrlListView_AddSubItem($idListviewP, 1, $ValueRow0, 1, 1) ; $item42 = _GUICtrlListView_AddSubItem($idListviewP, 1, $ValueRow3, 2, 2) ; GUICtrlSetState($item2, 0x00000020) $item5 = GUICtrlCreateListViewItem($ValueRow0, $idListviewP) $item6 = GUICtrlCreateListViewItem($ValueRow1, $idListviewP) $item7 = GUICtrlCreateListViewItem($ValueRow2, $idListviewP) $item8 = GUICtrlCreateListViewItem($ValueRow3, $idListviewP) GUICtrlCreateInput("", 20, 200, 150) GUICtrlSetState(-1, $GUI_DROPACCEPTED) GUISetState(@SW_SHOW) Do $msg = GUIGetMsg() Select Case $msg = $button MsgBox($MB_SYSTEMMODAL, "listview item", GUICtrlRead(GUICtrlRead($idListviewP)), 2) ;Case $msg = $listview ;MsgBox($MB_SYSTEMMODAL, "listview", "clicked=" & GUICtrlGetState($idListviewP), 2) EndSelect Until $msg = $GUI_EVENT_CLOSE EndFunc ;==>Example Edited September 14, 2017 by Melba23 Added code tags Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted September 14, 2017 Moderators Share Posted September 14, 2017 mnaboud76, How about using groups within the ListView: expandcollapse popup#include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> Example() Func Example() Local $aInfo, $hImage, $idListview GUICreate("ListView Set Group Info", 400, 300) $idListview = GUICtrlCreateListView("", 2, 2, 394, 268) GUISetState(@SW_SHOW) ; Add columns _GUICtrlListView_AddColumn($idListview, "Column 1", 100) _GUICtrlListView_AddColumn($idListview, "Column 2", 100) _GUICtrlListView_AddColumn($idListview, "Column 3", 100) ; Add items _GUICtrlListView_AddItem($idListview, "Row 1: Col 1", 0) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 2", 1) _GUICtrlListView_AddSubItem($idListview, 0, "Row 1: Col 3", 2) _GUICtrlListView_AddItem($idListview, "Row 2: Col 1", 1) _GUICtrlListView_AddSubItem($idListview, 1, "Row 2: Col 2", 1) _GUICtrlListView_AddItem($idListview, "Row 3: Col 1", 2) ; Build groups _GUICtrlListView_EnableGroupView($idListview) _GUICtrlListView_InsertGroup($idListview, -1, 1, "Group 1") _GUICtrlListView_InsertGroup($idListview, -1, 2, "Group 2") _GUICtrlListView_SetItemGroupID($idListview, 0, 1) _GUICtrlListView_SetItemGroupID($idListview, 1, 2) _GUICtrlListView_SetItemGroupID($idListview, 2, 2) _GUICtrlListView_SetGroupInfo($idListview, 2, "Group 2", 0, $LVGS_COLLAPSIBLE) ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example As you can see, group 2 can be expanded and collapsed as required. M23 Skysnake 1 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...
mnaboud76 Posted September 15, 2017 Author Share Posted September 15, 2017 thank you very much for all and every things is OK now thanks Melba23 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