Go Back   Forum Care Forums > Development Reference Area > Visual Basic

Reply
 
LinkBack Thread Tools Display Modes
listvieuw insert data
Old
  (#1)
Gurk
Guest
 
Posts: n/a
Default listvieuw insert data - 06-04-2007, 09:46 AM

at the moment i've git this code and it works fine

Private Sub Command2_Click()

Dim clmX As ColumnHeader

Set clmX = ListView1.ColumnHeaders. _
Add(, , "IO", ListView1.Width / 10)

For intI = 1 To 16
strIO = GetINI("IO", "IO" & intI, "?")

If strIO = "input" Then

Set clmX = ListView1.ColumnHeaders. _
Add(, , intI, ListView1.Width / 40)


End If
Next intI

ListView1.View = 3


no meightby a simple question, but is there a way to add values into certain
collomns.

thanks Maarten


   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: listvieuw insert data
Old
  (#2)
Randy Birch
Guest
 
Posts: n/a
Default Re: listvieuw insert data - 06-04-2007, 09:47 AM

Not sure I understand what you're asking. Once you've added the
columnheaders, you can add listitems to the control. For each list item
added you can add subitem data, just like the details view in explorer. You
can not have a line with only subitem data ... there has to be a main item
even if it is a space.

dim itmx as listitem

set itmx = listview1.listitems.add (,,"item1")
itmx.subitems(1) = "second column data"
itmx.subitems(2) = "third column data"
...etc

Once the item is added, you can later change the subitem data using:

listview1.listitems(1).subitems(1) = "new second column data"

.... or

listview1.listsubitems(1) = "new second column data"

.... or by a reference ...

set itmx = listview1.listitem(1)
itmx.subitems(1) = "new second column data"

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.


"Gurk" <EMAIL REMOVED> wrote in message
news:4124c877$0$3553$EMAIL REMOVED...
: at the moment i've git this code and it works fine
:
: Private Sub Command2_Click()
:
: Dim clmX As ColumnHeader
:
: Set clmX = ListView1.ColumnHeaders. _
: Add(, , "IO", ListView1.Width / 10)
:
: For intI = 1 To 16
: strIO = GetINI("IO", "IO" & intI, "?")
:
: If strIO = "input" Then
:
: Set clmX = ListView1.ColumnHeaders. _
: Add(, , intI, ListView1.Width / 40)
:
:
: End If
: Next intI
:
: ListView1.View = 3
:
:
: no meightby a simple question, but is there a way to add values into
certain
: collomns.
:
: thanks Maarten
:
:

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: listvieuw insert data
Old
  (#3)
Gurk
Guest
 
Posts: n/a
Default Re: listvieuw insert data - 06-04-2007, 09:47 AM

thank you verry much

you helped me a long way ahead
kind regards Maarten


"Randy Birch" <EMAIL REMOVED> wrote in message
news:qweVc.1117$EMAIL REMOVED. rogers.com...
> Not sure I understand what you're asking. Once you've added the
> columnheaders, you can add listitems to the control. For each list item
> added you can add subitem data, just like the details view in explorer.

You
> can not have a line with only subitem data ... there has to be a main item
> even if it is a space.
>
> dim itmx as listitem
>
> set itmx = listview1.listitems.add (,,"item1")
> itmx.subitems(1) = "second column data"
> itmx.subitems(2) = "third column data"
> ...etc
>
> Once the item is added, you can later change the subitem data using:
>
> listview1.listitems(1).subitems(1) = "new second column data"
>
> ... or
>
> listview1.listsubitems(1) = "new second column data"
>
> ... or by a reference ...
>
> set itmx = listview1.listitem(1)
> itmx.subitems(1) = "new second column data"
>
> --
>
> Randy Birch
> MVP Visual Basic
> http://vbnet.mvps.org/
> Please respond only to the newsgroups so all can benefit.
>
>
> "Gurk" <EMAIL REMOVED> wrote in message
> news:4124c877$0$3553$EMAIL REMOVED...
> : at the moment i've git this code and it works fine
> :
> : Private Sub Command2_Click()
> :
> : Dim clmX As ColumnHeader
> :
> : Set clmX = ListView1.ColumnHeaders. _
> : Add(, , "IO", ListView1.Width / 10)
> :
> : For intI = 1 To 16
> : strIO = GetINI("IO", "IO" & intI, "?")
> :
> : If strIO = "input" Then
> :
> : Set clmX = ListView1.ColumnHeaders. _
> : Add(, , intI, ListView1.Width / 40)
> :
> :
> : End If
> : Next intI
> :
> : ListView1.View = 3
> :
> :
> : no meightby a simple question, but is there a way to add values into
> certain
> : collomns.
> :
> : thanks Maarten
> :
> :
>



   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top