I'm looking for a possibility to edit the subitems of a TListItem in a
TListView component. It is possible to edit the caption of the TListItem
by pressing F2 or doubleclicking the item. But there seems no way to
do the same with the subitems. So I played around with a TEdit which
I placed over the subitem text on the TListView component. But there
is a lot of work to do till everything behaves correct with inputs from
mouse and keyboard and changing focuses. So I'm wondering if any-
body has a solution for this problem. Thanks for your answers.
Peter
HTH
Peter Huber <hu...@eek.ee.ethz.ch> wrote in message
news:37581E9D...@eek.ee.ethz.ch...
Peter
Peter Huber <hu...@eek.ee.ethz.ch> wrote in message
news:37585227...@eek.ee.ethz.ch...
As Subitems is of type TStrings, you might try something like this and
modify it to fit your needs. Put it into one of the ListView's mouse
events (which has the additional advantage of giving you two more
params, Button and Shift):
ListView.GetItemAt(x, y).Subitems.Strings[0] :=
InputBox('','','NewValue');
Will change the first subitem of the selected ListItem to the value you
enter into InputBox. Not too elegant but effective ..
_________
Andreas
http://members.truepath.com/delphi/totdindex.html
Timo
Peter Huber <hu...@eek.ee.ethz.ch> schreef in berichtnieuws
37585227...@eek.ee.ethz.ch...
> It's rather the TStringGrid or TDrawGrid component which meets my
> requirements because the Information I want to display is in tabular form.
> But I'm not really happy with this old components because many of the
> features you get with TListView and TTreeView are not availabe with
> these components. Thanks for your hint, Mark.
>
> Peter
>
> Mark Lauter wrote:
>
> > Perhaps a TTreeView would give you the same functionality you desire and
it
> > has the ability to edit sub items (since each sub item is just another
node
> > on the tree).
> >
> > HTH
> >
> > Peter Huber <hu...@eek.ee.ethz.ch> wrote in message
> > news:37581E9D...@eek.ee.ethz.ch...
> > > Hi,
> > >
> > > I'm looking for a possibility to edit the subitems of a TListItem in a
> > > TListView component. It is possible to edit the caption of the
TListItem
> > >
> > > by pressing F2 or doubleclicking the item. But there seems no way to