Steps property for my VCL
Posted on 2004-09-13
I have write an edit box replacement and now I wish to add a defined number of undos. To say 10.
I wish to create an array of 10 elements and to add the undo steps.
In this array I wish to store 5 integers and 2 strings values fo each element of the array. How to do that?
On this moment I declare a class derived from TPersistent:
property Undo1:integer .....
But maybe exist a better way. This way create a problem when add the 11 step. Then I must delete ( clear ) the first undo, and move all next 9 elements down. The 10 will become clear and to let me to store this step.
I use :
for i:=1 to 10 do begin
Can somebody figure out a better solution ? When I clear the first element to autodecrease the index for first 9 elements and to let me to have 10 element free.