Jump to content
Sign in to follow this  

possible to use a variable for listviewitems

Recommended Posts

Did you try it???

... works for me

#include <GUIConstants.au3>

GUICreate("listview items",220,250, 100,200,-1,$WS_EX_ACCEPTFILES)

$var = "This info inserted"

$listview = GUICtrlCreateListView ("col1  |col2|col3  ",10,10,200,150);,$LVS_SORTDESCENDING)
$button = GUICtrlCreateButton ("Value?",75,170,70,20)
$item1=GUICtrlCreateListViewItem("item2|" & $var & "|col23",$listview)
$input1=GUICtrlCreateInput("",20,200, 150)

  $msg = GUIGetMsg ()
Until $msg = $GUI_EVENT_CLOSE


Edited by Valuater


Share this post

Link to post
Share on other sites

GUICtrlCreateListViewitem("item1|" & $Var & "|item3",$list)

something like this ^

probly a very simple thing to do but i cant find it in the help file

I suspect that you might have tried it by modifying the help file example. If this is correct maybe you didn't notice that there are some lines you need to comment out which delete the previously set items.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post

Link to post
Share on other sites

You could always mix it up a bit

#include <array.au3>

$Heading4 = "Heading4"

Dim $headings[5] = ["Heading1","Heading2","Heading3",$Heading4,"Heading5"]

GUICtrlCreateListViewitem(_ArrayToString($headings, "|"))

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...