Sign in to follow this  
Followers 0
FireLordZi

Set date in Listview

5 posts in this topic

How do I set the date next to a listview item, in the next column?


While Alive() {
	 DrinkWine();
}
AutoIt Programmer

Share this post


Link to post
Share on other sites



Not sure what you mean. Can you post some code.

Share this post


Link to post
Share on other sites

If $Online > 0 Then
                                INIWrite("C:\buddies.ini", "OnlineBuddies", $buddyname, IniRead("C:\buddies.ini", "OnlineBuddies", $buddyname, "") & $text & ","); Writes the buddy's name and table to the ini
                                GUICtrlSetData($nListview, "|" & "|" & _NowDate()) ; here im trying to set the date next to a listview item under a column
                                GUICtrlSetImage($nListview, "shell32.dll", -138)
                            Else
                                GUICtrlSetImage($items, "shell32.dll", -110)
                            EndIf

Trying to set it next to a listview item in the column to the right of it.


While Alive() {
	 DrinkWine();
}
AutoIt Programmer

Share this post


Link to post
Share on other sites

How do I set the date next to a listview item, in the next column?

I assume you want to know how to set the text in the next column after the listview has been created, because I think you can work out the date.

In GuiListView.au3 the function you need is as below and used as shown

_GUICtrlListView_SetItemText(GUICtrlGetHandle($ListView), $Zero_Based_Item, "Text for column 1|21st Jan 2008", -1)

From Help = itemtext separated with Opt("GUIDataSeparatorChar",...)


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

#5 ·  Posted (edited)

I did:

_GUICtrlListViewSetItemText($nListview, $items, 2, _NowDate())
and its not working?

EDIT:

Never mind, I got it working. Thanks.

Edited by FireLordZi

While Alive() {
	 DrinkWine();
}
AutoIt Programmer

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  
Followers 0