Jump to content

Guictrlsetimage Help


notta
 Share

Recommended Posts

Can you guys tell me how to get rid of the number next to the icon in the first column. Thanks.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ListviewConstants.au3>
#Include <GuiListView.au3>
#Include <File.au3>
#include <ComboConstants.au3>



Global $Listview
Global $var = ""
Global $msg

    $gui = GUICreate("Test",400,700) ; will create a dialog box that when displayed is centered
    $btnRun = GUICtrlCreateButton("Run",215,280,75)
    
    $ListView = GUICtrlCreateListView("Col1|Col2" _
    ,10,340,380,320,-1,$LVS_EX_HEADERDRAGDROP+$LVS_EX_FULLROWSELECT+$LVS_EX_GRIDLINES)
    GUICtrlSetState($ListView,$GUI_FOCUS)
    
    GUISetState(@SW_SHOW)   
    
    While 1
        $msg = GUIGetMsg()
        
        if $msg = $btnRun Then
            
            For $j = 1 To 10
                GUICtrlCreateListViewItem(GUICtrlSetImage($ListView, "Shell32.dll", -200) & "|" & $j,$Listview)
            Next
        EndIf
        
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
        
    GUIDelete()
Link to comment
Share on other sites

notta

Example:

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <ListviewConstants.au3>
#Include <GuiListView.au3>
#Include <File.au3>
#include <ComboConstants.au3>

Global $Listview
Global $var = ""
Global $msg

    $gui = GUICreate("Test",400,700) ; will create a dialog box that when displayed is centered
    $btnRun = GUICtrlCreateButton("Run",215,280,75)
    
    $ListView = GUICtrlCreateListView("Col1|Col2" _
    ,10,340,380,320,-1,$LVS_EX_HEADERDRAGDROP+$LVS_EX_FULLROWSELECT+$LVS_EX_GRIDLINES)
    GUICtrlSetState($ListView, $GUI_FOCUS)
    
    GUISetState(@SW_SHOW)    
    
    While 1
        $msg = GUIGetMsg()
        
        if $msg = $btnRun Then
            
            For $j = 1 To 10
                GUICtrlCreateListViewItem("|" & $j, $Listview)
                GUICtrlSetImage(-1, "Shell32.dll", -200)
            Next
        EndIf
        
        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
        
    GUIDelete()
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...