Jump to content
Sign in to follow this  


Recommended Posts

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.


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


Share this post

Link to post
Share on other sites

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!

Share this post

Link to post
Share on other sites
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>
#include <Array.au3>
#include <GuiListView.au3>
#include <WindowsConstants.au3>


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)
   _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] & "|"
               $ValueRow0 &= $aArray1[$i][$j]
         if $i == 1 Then
            If $j < 2 Then
               $ValueRow1 &= $aArray1[$i][$j] & "|"
               $ValueRow1 &= $aArray1[$i][$j]
         if $i == 2 Then
            If $j < 2 Then
               $ValueRow2 &= $aArray1[$i][$j] & "|"
               $ValueRow2 &= $aArray1[$i][$j]
         if $i == 3 Then
            If $j < 2 Then
               $ValueRow3 &= $aArray1[$i][$j] & "|"
               $ValueRow3 &= $aArray1[$i][$j]
    $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)
        $msg = GUIGetMsg()

            Case $msg = $button
                MsgBox($MB_SYSTEMMODAL, "listview item", GUICtrlRead(GUICtrlRead($idListviewP)), 2)
            ;Case $msg = $listview
                ;MsgBox($MB_SYSTEMMODAL, "listview", "clicked=" & GUICtrlGetState($idListviewP), 2)
    Until $msg = $GUI_EVENT_CLOSE
EndFunc ;==>Example


Edited by Melba23
Added code tags

Share this post

Link to post
Share on other sites


How about using groups within the ListView:

#include <GUIConstantsEx.au3>
#include <GuiImageList.au3>
#include <GuiListView.au3>


Func Example()
    Local $aInfo, $hImage, $idListview

    GUICreate("ListView Set Group Info", 400, 300)

    $idListview = GUICtrlCreateListView("", 2, 2, 394, 268)

    ; 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_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.
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

EndFunc   ;==>Example

As you can see, group 2 can be expanded and collapsed as required.


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:


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


Share this post

Link to post
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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...