StringGrid.rows - out of bound problem after deleterow
From: Aramis Gunton (aramis_at_nink.demon.co.uk)
Date: 06/24/04
- Previous message: frederick: "Re: Menu to use modal form or not?"
- Next in thread: Maarten Wiltink: "Re: StringGrid.rows - out of bound problem after deleterow"
- Reply: Maarten Wiltink: "Re: StringGrid.rows - out of bound problem after deleterow"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 24 Jun 2004 12:36:01 +0100
I have a TStringGrid that requires a delete row feature.
I have used the grid hack to gain access to "deleterow" and "moverow"
which indeed removes the selected row however subsequent to the deletion
the row now occupying the deleted rows original position is
inaccessible.
StringGrid1.rows[deletedposition] returns ([(out of bound) 2, (out of
bound) 4], #0. #0, 0 nil) as opposed to ([], #0, #0, 0, nil) for all of
the other rows.
I have an example that operates perfectly however I do not understand
why on the sample TStringGrid evaluation of rows[index] = () whereas in
my software the same expression yields ([],#0,#0, 0, nil)
I just cannot get round this obstacle and fail to understand why I am
experiencing the problem described when the sample I have which does
ostensibly the same thing operates perfectly.
Is there a simple reason why inside the Debug Inspector my
StringGrid.row[0] has a "Data" element tab containing Fdefined,
FDelimeter etc whereas in the working row deletion/insertion example I
have StringGrid.row[0] does not.
I assume I am missing the obvious here.
Many thanks for any insight.
-- Aramis Gunton
- Previous message: frederick: "Re: Menu to use modal form or not?"
- Next in thread: Maarten Wiltink: "Re: StringGrid.rows - out of bound problem after deleterow"
- Reply: Maarten Wiltink: "Re: StringGrid.rows - out of bound problem after deleterow"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]