I’m working on a little word processor, and right now I’m doing the indent paragraph part. I’ve made a Form very similar to the one Word uses when you go to Format-Paragraph. The thing is I would like to put in the text property of the Spinedit eg. ‘1.5 (cm)’ and to change each time I press the arrow buttons.
Seems easy, but try it yourself …
The bug/big problem here is that I don’t know why when I put the code in the Onchange event it reads it a thousand times. Try the following, and tell me if I’m wrong, but I saw what Delphi does by doing F7 each time, and it was like if the procedure looped lots of times.
Put a SpinEdit in a form, add the following procedure and declare it, and then link the procedure with the SpinEdit’s OnChange event.
procedure TfrmParrafo.seIzquierdaChange(Sender: TObject);
indentacion := indentacion + 0.1;
seIzquierda.Text := FloattoStr(indentacion) + ' (cm)';