Hunter
Fri Oct 24 23:07:56 CDT 2003
That did it, I was confusing myself with subitems , basically I was trying
to use a listview as a better looking listbox with the grid on and detail
view. I've got it working now, thanks for your help
"Chris Botha" <chris_s_botha@AT_h.o.t.m.a.i.l.com> wrote in message
news:eQDhapqmDHA.3688@TK2MSFTNGP11.phx.gbl...
> Hunter, basically this is it, if you do something like
> MsgBox(ListView1.SelectedItems(0).SubItems(1).Text)
> then it should show, or what do you mean by sub-item? Earlier you
mentioned
> a single column? To get the text of the 1 column item
> MsgBox(ListView1.SelectedItems(0).Text) will show the text of the 1st
> selected item.
>
> "Hunter Kirk" <hunter@twilightech.com> wrote in message
> news:vpjr4ca39sqr41@corp.supernews.com...
> > hmm this still doesn't seem to help me get the text from the selected
> item,
> > is there a way to pass to this method the selected items index ?
> >
> > "Chris Botha" <chris_s_botha@AT_h.o.t.m.a.i.l.com> wrote in message
> > news:uCOmOUqmDHA.2436@TK2MSFTNGP09.phx.gbl...
> > > To get the text of the 1st sub-item
> > > ListView1.SelectedItems(0).SubItems(1).Text
> > > Note that if you use a zero as the sub-items index, you will get the
> main
> > > item's text,
> > > ListView1.SelectedItems(0).SubItems(0).Text
> > >
> > > "Hunter Kirk" <hunter@twilightech.com> wrote in message
> > > news:vpjb8i6ssgfl14@corp.supernews.com...
> > > > k well I kinda hacked out a solution for hiding the column buy just
> > > setting
> > > > my single column's width to that of the list view. seems kind of a
> hack
> > > way
> > > > to do things, especially with resizing seems I have to update the
> width
> > of
> > > > the column with the listview anytime the listview is resized. now if
I
> > can
> > > > just get that darned text from the selected subitem :)
> > > >
> > > > "Hunter Kirk" <hunter@twilightech.com> wrote in message
> > > > news:vpj4i63771ps1f@corp.supernews.com...
> > > > > I'm having a rather tedious problem with the listview control in
> > visual
> > > > > basic.net
> > > > >
> > > > > I am trying to achive two simple procedures, I thought :)
> > > > >
> > > > > 1. I have only one column populated but still there is an extra
> empty
> > > > column
> > > > > listed to the right of the header. Is there no way to specify that
I
> > > only
> > > > > want a single column. Or is there a way to hide that unpopulated
> extra
> > > > > column that I don't want.
> > > > >
> > > > > 2. How exactly does one reference the text or value of the
selected
> > sub
> > > > > item. I would like to pass this text in my case to a function but
> I'm
> > > > unable
> > > > > to get it.
> > > > >
> > > > > Sorry for the I'm sure simple questions, but I have googled my
> brains
> > > out
> > > > > and been over the docs and can find nothing to point me in the
right
> > > > > direction.
> > > > >
> > > > > Thanks in advance
> > > > > --
> > > > > Hunter Kirk
> > > > > Twilight Technologies, L.L.C.
> > > > > hunter@twilightech.com
> > > > >
http://www.twilightech.com
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>