Jump to content

[SOLVED] image in Listview issue


Recommended Posts

 

but  ,  why i must   mix  a colum  and  after with columoreder   unmix  again  ??? 

in  this example  put  icon only first  in  first colum  and   first in 3  colum

and  dont  use  columorder i think is possible to do with  out  columorder

I think you forget 2 things.

1. you have to swap the column order, If you want to put an icon in Column 3, set it as the first column

    ; Add columns

    _GUICtrlListView_AddColumn($listview, "Column 3", 100)

    _GUICtrlListView_AddColumn($listview, "Column 1", 120)

    _GUICtrlListView_AddColumn($listview, "Column 2", 100)

 

2. when finsihed with filling your listview reset the colum order the way you want it

_GUICtrlListView_SetColumnOrder($ListView, "1|2|0") ;

Contributions

CheckUpdate - SelfUpdating script ------- Self updating script

Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple

MsgBox with CountDown ------------------- MsgBox with visual countdown

Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView

Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV)

USB Drive Tools ------------------------------ Tool to help you with your USB drive management

Input Period udf ------------------------------ GUI for a period input

Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette

Excel Chart UDF ----------------------------- Collaboration project with water 

GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm

TaskListAllDetailed --------------------------- List All Scheduled Tasks

Computer Info --------------------------------- A collection of information for helpdesk

Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only)

Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format

Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane

Oracle SQL Report Generator -------------  Oracle Report generator using SQL

SQLite Report Generator -------------------  SQLite Report generator using SQL

SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field

DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access

Animated animals ----------------------------- Fun: Moving animated objects

Perforated image in GUI --------------------- Fun: Perforate your image with image objects

UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ

Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool

Visual Image effect (GUI) -------------------- Visually apply effects on an image

 

 

 

Link to comment
Share on other sites

o i use  this trick

create a icon  white and little

i call it  mail.ico

For $i3 = 0 To UBound($areturn3) - 1


$hImage = _GUIImageList_Create(16, 16, 5, 3)
_GUIImageList_AddIcon($hImage,  @ScriptDir & "\icon\MAIL.ico")
    _GUIImageList_AddIcon($hImage,  @ScriptDir & "\icon\MAIL.ico")

_GUIImageList_AddIcon($hImage,  @ScriptDir & "\icon\up1.ico")

_GUICtrlListView_SetImageList($list1, $hImage, 1)
_GUICtrlListView_SetItemImage($list1,$i3, 2,3)



Next
Link to comment
Share on other sites

is  not perfect solituion  i know

but i belive is not  good  mix  a colum for demixing  with  SetColumnOrder

I hope this thing will improve in next future

Only if Microsoft does something, because it's a Windows issue, nothing whatsoever to do with AutoIt.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

 

o i use  this trick

create a icon  white and little

i call it  mail.ico

For $i3 = 0 To UBound($areturn3) - 1


$hImage = _GUIImageList_Create(16, 16, 5, 3)
_GUIImageList_AddIcon($hImage,  @ScriptDir & "\icon\MAIL.ico")
    _GUIImageList_AddIcon($hImage,  @ScriptDir & "\icon\MAIL.ico")

_GUIImageList_AddIcon($hImage,  @ScriptDir & "\icon\up1.ico")

_GUICtrlListView_SetImageList($list1, $hImage, 1)
_GUICtrlListView_SetItemImage($list1,$i3, 2,3)



Next

Is every icon not 16 x 16 in the listview, whatever the size of the cons is?

Can you post a working example?

Contributions

CheckUpdate - SelfUpdating script ------- Self updating script

Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple

MsgBox with CountDown ------------------- MsgBox with visual countdown

Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView

Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV)

USB Drive Tools ------------------------------ Tool to help you with your USB drive management

Input Period udf ------------------------------ GUI for a period input

Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette

Excel Chart UDF ----------------------------- Collaboration project with water 

GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm

TaskListAllDetailed --------------------------- List All Scheduled Tasks

Computer Info --------------------------------- A collection of information for helpdesk

Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only)

Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format

Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane

Oracle SQL Report Generator -------------  Oracle Report generator using SQL

SQLite Report Generator -------------------  SQLite Report generator using SQL

SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field

DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access

Animated animals ----------------------------- Fun: Moving animated objects

Perforated image in GUI --------------------- Fun: Perforate your image with image objects

UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ

Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool

Visual Image effect (GUI) -------------------- Visually apply effects on an image

 

 

 

Link to comment
Share on other sites

is long  script  but i  isolated   a part   ,  this is  a   part , i hope  you understund  :D  because  i am novice in develop program :)

#include <GUIConstants.au3>
#include <GuiStatusBar.au3>
#include <WinHttp.au3>
#include <GuiListView.au3>
#include <GUIConstantsEx.au3>
#include <GuiImageList.au3>

Opt("GuiOnEventMode", 1)
Opt("GUICloseOnESC", 0)

Global  $MenuItem1 ,$MenuItem2 ,$MenuItem3, $MenuItem4,$sHTML ,$areturn,$areturn1,$areturn2,$pagine,$areturn4,$i4,$totali_torrent3,$hImage
Global $sGET_multi[999],$m
Global $Input1 , $hStatus,$sGET,$sType,$sHost,$hSession,$hConnection,$percorso,$list1,$totali_torrent,$totali_torrent2,$i2,$count,$areturn3,$i3

_dlink_client_torrent()

Func _dlink_client_torrent()

$Form1 = GUICreate("Dlink Client Torrent", 580, 372, 299, 166)
$Group1 = GUICtrlCreateGroup("", 8, 0, 561, 329)
$Input1 = GUICtrlCreateInput("", 24, 24, 241, 21)
$Button1 = GUICtrlCreateButton("Sfoglia", 272, 24, 75, 21, 0)
$Button2 = GUICtrlCreateButton("Carica", 360, 24, 75, 21, 0)
$List1 = GUICtrlCreateListView("", 16, 88, 545, 227)
_GUICtrlListView_SetExtendedListViewStyle($List1, BitOR($LVS_EX_FULLROWSELECT, $LVS_EX_FULLROWSELECT, $LVS_EX_INFOTIP, $LVS_EX_GRIDLINES, $LVS_EX_SUBITEMIMAGES,$LVS_EX_CHECKBOXES)) ; questa stringa fa la griglia stile excel
    _GUICtrlListView_AddColumn($List1, "Nome", 200)
    ;_GUICtrlListView_AddColumn($List1, "Priorità", 50)
    _GUICtrlListView_AddColumn($List1, "Dimensione", 85)
    _GUICtrlListView_AddColumn($List1, "Progresso", 80)
    _GUICtrlListView_AddColumn($List1, "Stato", 50)
    _GUICtrlListView_AddColumn($List1, "DL/UL Velocità", 80)
    ;_GUICtrlListView_AddColumn($List1, "Start/Stop", 70)
GUICtrlCreateGroup("", -99, -99, 1, 1)

GUISetState(@SW_SHOW)

_popola_list()
EndFunc


$areturn=StringRegExp('de','de',3)
$areturn1=StringRegExp('de','de',3)
; è giu
$areturn3=StringRegExp('de','de',3)  ;up icona
$areturn4=StringRegExp('de','de',3) ;down icona

Func _popola_list()
$sGET = ''
$areturn=''
$i=''
$v=0
$areturn1=''
$i1=''
$1=1
$prog=1
$m=1

_GUICtrlListView_AddItem($list1, "Row 1: Col 1", 0)
    _GUICtrlListView_AddSubItem($list1, 0, "Row 1: Col 2", 1, 1)
    _GUICtrlListView_AddSubItem($list1, 0, "Row 1: Col 3", 2, 2)

    _GUICtrlListView_AddSubItem($list1, 1, "Row 2: Col 2", 1, 2)

    _GUICtrlListView_AddItem($list1, "Row 4: Col 1", 3)

    $hImage = _GUIImageList_Create(16, 16, 5, 3)
_GUIImageList_AddIcon($hImage,  @ScriptDir & "\icon\MAIL.ico")
_GUIImageList_AddIcon($hImage,  @ScriptDir & "\icon\MAIL.ico")
_GUIImageList_AddIcon($hImage,  @ScriptDir & "\icon\up1.ico")
_GUICtrlListView_SetImageList($list1, $hImage, 1)
_GUICtrlListView_SetItemImage($list1,$i3, 2,3)


For $i = 0 To UBound($areturn) - 1


_GUICtrlListView_AddItem($list1,$areturn[$i], $v)



Next


For $i1 = 0 To UBound($areturn1) - 1

_GUICtrlListView_AddSubItem($list1, $v, $areturn1[$i1], $1, $prog) ; 1   1

Next


For $i3 = 0 To UBound($areturn3) - 1

$hImage = _GUIImageList_Create(16, 16, 5, 3)
_GUIImageList_AddIcon($hImage,  @ScriptDir & "\icon\MAIL.ico")
_GUIImageList_AddIcon($hImage,  @ScriptDir & "\icon\MAIL.ico")
_GUIImageList_AddIcon($hImage,  @ScriptDir & "\icon\up1.ico")
_GUICtrlListView_SetImageList($list1, $hImage, 1)
_GUICtrlListView_SetItemImage($list1,$i3, 2,3)

$totali_torrent2=$totali_torrent2-1

Next
$totali_torrent2=$totali_torrent2+1
Do

$totali_torrent2=$totali_torrent2+1
Until $totali_torrent2= $totali_torrent3

;EndIf
    EndFunc
Link to comment
Share on other sites

I see,

BTW, the script remains in a loop somewhere, I had to kill the process.

A few advises if you don't mind:

Always declare your variables like

Local $sGET = '', $areturn = '', $i = '', $v = 0, $areturn1 = '', $i1 = '', $1 = 1, $prog = 1, $m = 1

Instead of $totali_torrent2 = $totali_torrent2 + 1 use

$totali_torrent2 += 1

same result but less coding.

Try to use variable names that mean something, so that it is easier to understand what you want to do

This will make your life easier when you maintain your program

Thanks for sharing

GreenCan

Contributions

CheckUpdate - SelfUpdating script ------- Self updating script

Dynamic input validation ------------------- Use a Input masks can make your life easier and Validation can be as simple

MsgBox with CountDown ------------------- MsgBox with visual countdown

Display Multiline text cells in ListView ---- Example of pop-up or ToolTip for multiline text items in ListView

Presentation Manager ---------------------- Program to display and refresh different Border-less GUI's on a Display (large screen TV)

USB Drive Tools ------------------------------ Tool to help you with your USB drive management

Input Period udf ------------------------------ GUI for a period input

Excel ColorPicker ---------------------------- Color pickup tool will allow you to select a color from the standard Excel color palette

Excel Chart UDF ----------------------------- Collaboration project with water 

GetDateInString ------------------------------ Find date/time in a string using a date format notation like DD Mon YYYY hh:mm

TaskListAllDetailed --------------------------- List All Scheduled Tasks

Computer Info --------------------------------- A collection of information for helpdesk

Shared memory Demo ----------------------- Demo: Two applications communicate with each other through means of a memory share (using Nomad function, 32bit only)

Universal Date Format Conversion -------- Universal date converter from your PC local date format to any format

Disable Windows DetailsPane -------------- Disable Windows Explorer Details Pane

Oracle SQL Report Generator -------------  Oracle Report generator using SQL

SQLite Report Generator -------------------  SQLite Report generator using SQL

SQLite ListView and BLOB demo ---------- Demo: shows how binary (image) objects can be recognized natively in a database BLOB field

DSN-Less Database connection demo --- Demo: ActiveX Data Objects DSN-Less Database access

Animated animals ----------------------------- Fun: Moving animated objects

Perforated image in GUI --------------------- Fun: Perforate your image with image objects

UEZ's Perforator major update ------------- Fun: Pro version of Perforator by UEZ

Visual Crop Tool (GUI) ----------------------- Easy to use Visual Image Crop tool

Visual Image effect (GUI) -------------------- Visually apply effects on an image

 

 

 

Link to comment
Share on other sites

i have  nas  dlink dns 320   and  over  yhe  nas  i  have  bit torrent  ,  but  for  browse  and  add  the  torrent  file i must  browse  many page , i  want  creat  a  simple  app , for  insert directly  and  look  percent of download  of  torrent  with out browser

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

×
×
  • Create New...