Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 9th, 2009, 05:49 AM
Registered User
 
Join Date: Aug 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Question Selecting all the Listview information using selectall function

i simple want when user click on the select all checkbox.all the checkboxes of list view should be filled with check sign.which is working fine.but problem is that when user click again on the checkbox .checksign still stay there.kindly let me know the idea any help would be highly appreciated.
Code:
Private Sub Check1_Click() 
Call SelectAll 
End Sub 
Private Function SelectAll() As Boolean 
    Dim Item As listitem 

    For Each Item In ListView1.ListItems 
        Item.Checked = True 
    Next 
  
    SelectAll = True 
End Function
Reply With Quote
  #2 (permalink)  
Old August 9th, 2009, 10:51 AM
Friend of Wrox
Points: 7,395, Level: 36
Points: 7,395, Level: 36 Points: 7,395, Level: 36 Points: 7,395, Level: 36
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Capital Federal, , Argentina.
Posts: 2,190
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hello. Just reading your code you realize something, you are cheking the items (in Item.Checked = True), but you never do the opposite (Item.Checked = false). Just replace the True with Check1.checked, and you will have what you want.
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========
Reply With Quote
Reply


Thread Tools
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ListView asters VB.NET 2002/2003 Basics 0 March 27th, 2008 05:00 AM
selecting a row in a listview control debbiecoates Pro VB Databases 0 February 26th, 2008 06:48 AM
problem selecting listview item method Visual C++ 0 July 7th, 2006 04:06 PM
listView AristotleYu ASP.NET 2.0 Basics 0 May 11th, 2006 04:54 AM
Selecting a ListView item bmains Pro VB.NET 2002/2003 0 January 22nd, 2005 10:19 PM



All times are GMT -4. The time now is 09:28 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.