OvcOutline doesn't seem to have a GetNodeAt (X, Y : integer) :
TOvcOutlineNode;
or equivalent routine like eg. TTreeView has.
This would be useful in drag and drop (to determine the target node) and
providing
context sensitive menus and such.
There *is* a protected routine PointToIndex which can be used to implement
'GetNodeAt'
in a descendant class or using a 'cracker class'.
But I'd like to have it implemented in TOvcOutline. How about it? Pretty
please?
2) The question
Is there a way to remove a node from OvcOutline short of deleting all child
nodes of
the node's parent (using DeleteChildren) and readding those that should
remain?
Didn't spot any ... Node[i].Delete or equivalent but maybe thats just it
(didn't just
spot it I mean :).
TIA,
--
ilkka hyvärinen
You're right that PointToIndex is the method you're after. As you
mention, currently, you can only get at it with a cracker class, since
it's protected. I'll see if we can't move it out into the open soon. You
can do so in your own copy (move it to the public section, that is), if
you like.
> Is there a way to remove a node from OvcOutline short of deleting all
child
> nodes of
> the node's parent (using DeleteChildren) and readding those that
should
> remain?
Yes, of course. Simply free the node in question, and it will magically
disappear :)
- Per
"Ilkka Hyvärinen" <ilkka.h...@fulcrum.fi> wrote in message
news:QJDI7Zks...@tpsmail01.turbopower.net...
> Ilkka,
>
> You're right that PointToIndex is the method you're after. As you
> mention, currently, you can only get at it with a cracker class, since
> it's protected. I'll see if we can't move it out into the open soon.
Thanks Per!
> > Is there a way to remove a node from OvcOutline short of deleting
> > all child nodes of the node's parent (using DeleteChildren) and
> > readding those that should remain?
>
> Yes, of course. Simply free the node in question, and it will magically
> disappear :)
>
LOL! But that's ... that's... TOO EASY. ;) (Been using too much containers
that store pointers or some such non-TObject descendants... <argh!>)
--
ilkka hyvärinen