Pages

Monday, 5 October 2009

EditTable CookBook - The MOVE_ROW message

Still on the topic of undocumented EditTable features here's the details of the MOVE_ROW message that you can use to move a row within an EditTable. The nice thing about this message is that it takes all the colour, style and formatting information when the row is moved, which makes it easier to use than deleting and inserting the row "manually" yourself.

MOVE_ROW message

DescriptionMoves a row in a control
Applies ToEdit Table
Syntaxx = Send_Message( controlID, "MOVE_ROW", fromIndex, toIndex )
Parameters
fromIndex  Position of the row to move
toIndex  Position to move the row to. Specify -1 to move the row to the end of the Edit Table.
ReturnsNew position of the row


E.g.

0001     * // EditTable MOVE_ROW message example to move the
0002     * // row at position 2 to position 4
0003     
0004     edtID   = @window : ".TABLE_1"
0005     fromRow = 2
0006     toRow   = 4
0007     
0008     call send_Message( edtID, "MOVE_ROW", fromRow, toRow )


No comments:

Post a Comment