Discussion:
Preserving selected cell in TValueListEditor.
(too old to reply)
Jason Cipriani
2008-07-11 09:18:42 UTC
Permalink
I have a TValueListEditor where the user can edit a cell, then press a
button elsewhere on the form that eventually leads to the TValueListEditor
entries being cleared then restored. The TValueListEditor has a lot of rows
in it, and what happens now is when the entries are reset, the list scrolls
back up to the first row.

I would like to be able to preserve the current selection -- is there some
way to get and set the (row,column) of the currently selected cell? If there
isn't, at the very least I'd like to keep the value editor from scrolling
back to the top. I don't see any properties that look like they're related
to the current selection, nor do I see any that look like they're related to
which rows are visible. Is there some way to do what I'm trying to do?

Hopefully that was clear, it's getting pretty late,
Thanks,
Jason
Clayton Arends
2008-07-11 17:26:20 UTC
Permalink
I don't see any properties that look like they're related to the current
selection,
Look at Selection. It is a read/write property.
nor do I see any that look like they're related to which rows are visible.
Look at TopRow and VisibleRowCount. TopRow is a read/write property.

HTH,
Clayton
Jason Cipriani
2008-07-12 15:10:15 UTC
Permalink
Post by Clayton Arends
I don't see any properties that look like they're related to the current
selection,
Look at Selection. It is a read/write property.
nor do I see any that look like they're related to which rows are visible.
Look at TopRow and VisibleRowCount. TopRow is a read/write property.
Thanks, I wonder how I missed those...

Jason

Loading...