Results 1 to 6 of 6

Thread: simple LIST VIEW

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    208

    Post

    I have a LIST VIEW :
    |hWnd | CLASS | CAPTION |

    I must SPLIT each Item..
    like that:

    Code:
    Dim HWND,CLASS,CAPTION as string
    
    x= [LAST ITEM INDEX]
    
    For i = 1 to X
        HWND = line(i).hWnd
        CLASS = line(i).CLASS
        CAPTION = line(i).CAPTION
    Next i
    [.........]


    Cant someone coud help me ??

  2. #2
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    What exactly are you after? I'm not sure I understand your description.
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    208
    I want to SPLIT 3 data per line in my listview and after, goto the sencond line and extract 3 other data ( in a column each )

    like that:

    | data1.1 | data1.2 | data1.3 |
    | data2.1 | data2.2 | data2.3 |

    for i = 1 to (the last line of the listview )
    data1 = data(i).1
    data2 = data(i).2
    data3 = data(i).3
    check (data1,data2,data3)
    next i


  4. #4
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Here's some code that may help:

    ListView1.ListItems.Add
    ListView1.ListItems(1).SubItems(0) = "aaa"
    ListView1.ListItems(1).SubItems(1) = "bbb"
    ListView1.ListItems(1).SubItems(2) = "ccc"

    Dim i
    Dim a, b, c
    For i = 1 To ListView1.ListItems.Count
    a = ListView1.ListItems(i).ListSubItems(0)
    b = ListView1.ListItems(i).ListSubItems(1)
    c = ListView1.ListItems(i).ListSubItems(2)
    MsgBox a
    MsgBox b
    MsgBox c
    Next i
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Aug 2000
    Posts
    208
    Can you fix the code before give it to me ?

  6. #6
    Frenzied Member mlewis's Avatar
    Join Date
    Sep 2000
    Posts
    1,226
    Dim I, Data1, Data2, Data3

    For I = 1 to Listview.ListItems.Count
    Data1 = Listview.ListItems(I).SubItems(1)
    Data2 = Listview.ListItems(I).SubItems(2)
    Data3 = Listview.ListItems(I).SubItems(3)
    Check (Data1,Data2,Data3)
    Next I

    Is that what you're after?
    M. Lewis
    Pi-Q Software
    How many mouse clicks does it take to cook breakfast?

    Blargh! I am dead!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width