Old 1st July 2010, 12:19   #1
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
Header file for creating and handling listview control

I am a Chinese NSIS fan. In a forum, a member named "gfm688" write a header file to create and handle a listview control with the report view. This header file is used to create a list view with report view and handle it. See the url below for details, 8 examples included.

A demo installer with listview control:

The source code of this demo is also included.

http://nsis.sourceforge.net/Header_file_for_Listview

Last edited by jiake; 1st July 2010 at 13:06. Reason: incorrect words in text file
jiake is offline   Reply With Quote
Old 1st July 2010, 12:29   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Excellent. Is there a Wiki page?

Stu
Afrow UK is offline   Reply With Quote
Old 1st July 2010, 12:43   #3
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
No, I post this just the first time here.
jiake is offline   Reply With Quote
Old 1st July 2010, 12:51   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Mind making one then? Things get lost on the forum eventually.

Stu
Afrow UK is offline   Reply With Quote
Old 1st July 2010, 13:00   #5
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
OK, never mind, whether making or not.
jiake is offline   Reply With Quote
Old 2nd July 2010, 01:05   #6
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
I meant that you can make a page if you thought it is necessary, I wouldn't mind.

There are still something wrong in the comment of the script, but this does not affect the understanding.
jiake is offline   Reply With Quote
Old 2nd July 2010, 04:18   #7
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
I made a page:
http://nsis.sourceforge.net/Header_file_for_Listview
I will update in the future.
jiake is offline   Reply With Quote
Old 5th July 2010, 04:43   #8
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
For the latest header file please click here:
http://nsis.sourceforge.net/mediawik...a/ListView.zip
or view the link above.
Maybe errors or bugs in the former attachment on the first floor of this thread.

Last edited by jiake; 5th July 2010 at 05:16.
jiake is offline   Reply With Quote
Old 5th July 2010, 05:38   #9
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Quote:
Originally Posted by jiake View Post
Maybe errors or bugs in the former attachment on the first floor of this thread.
I suggest you edit the first post as well.
MSG is offline   Reply With Quote
Old 5th July 2010, 07:59   #10
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
I thought maybe, in fact still some incorrect words in comments or readme file. Later I modify the example and macros in the page but this post is the beginning version, for the administrator have set that I cannot edit after 3 hours. Please edit my first post or remove the attachment, replace it with the page link and lock this thread if you can.
jiake is offline   Reply With Quote
Old 13th July 2010, 09:20   #11
JohaViss
Junior Member
 
Join Date: Apr 2010
Posts: 29
How does one delete the selected item from the listbox?

There is a NSD_LV_InsertItem call for inserting items, but no NSD_LV_DeleteItem for removing an item.
JohaViss is offline   Reply With Quote
Old 13th July 2010, 09:46   #12
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Just send LVM_DELETEITEM.

Stu
Afrow UK is offline   Reply With Quote
Old 15th July 2010, 01:43   #13
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
Quote:
Originally Posted by JohaViss View Post
How does one delete the selected item from the listbox?
There is a NSD_LV_InsertItem call for inserting items, but no NSD_LV_DeleteItem for removing an item.
Quote:
Originally Posted by Afrow UK View Post
Just send LVM_DELETEITEM.
Stu
Yes, it is very easy as Afrow said:
SendMessage listview_HWND ${LVM_DELETECOLUMN} col_idx 0
SendMessage listview_HWND ${LVM_DELETEITEM} item_idx 0

If you want to delete a specified item but not by item index, see this. A simple example modified by one of that in the attachment. Shows that how to delete selected item, delete all items, reload all items. Just using sendmessage simply.
Attached Files
File Type: nsi Example.nsi (3.9 KB, 232 views)

Last edited by jiake; 15th July 2010 at 02:48.
jiake is offline   Reply With Quote
Old 28th February 2011, 03:38   #14
lancelhoff
Junior Member
 
Join Date: Feb 2011
Posts: 3
Question Clickable link for Listview column text?

Is it possible to make a column item clickable? I'd like to eventually be able to turn some column item text into a clickable link.

Attached is an example screenshot:
Attached Thumbnails
Click image for larger version

Name:	clickable-link.png
Views:	281
Size:	7.8 KB
ID:	48579  
lancelhoff is offline   Reply With Quote
Old 1st March 2011, 05:55   #15
T.Slappy
Major Dude
 
T.Slappy's Avatar
 
Join Date: Jan 2006
Location: Slovakia
Posts: 555
Send a message via ICQ to T.Slappy
Quote:
Originally Posted by lancelhoff View Post
Is it possible to make a column item clickable? I'd like to eventually be able to turn some column item text into a clickable link.

Attached is an example screenshot:
I suppose NO, all this stuff is related to WinAPI and I found no mention about this feature there.
Btw in my real job where I work with MFC and I was trying to do this, but with no success

Cool looking installers with custom design: www.graphical-installer.com
Create Setup Pages easily: www.install-designer.com
Build installers in Visual Studio 2005-2019: www.visual-installer.com
or RAD Studio 2009, 2010, XE-10.4 Sydney: www.rad-installer.com
T.Slappy is offline   Reply With Quote
Old 3rd March 2011, 10:57   #16
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Shanghai, China
Posts: 207
The example script in the 13th floor of this thread has been updated.
Please visit the Wiki page for the latest example:
http://nsis.sourceforge.net/Header_file_for_Listview
If any problems or suggestions, please contact me through email.
You can find it in signature below, or bottom of Wiki page.

Contact me: 137729898@qq.com
jiake is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump