How to Clear Multiple Edits Without Refering to Them One by One

Posted December 15th @ 9:23 pm by m3Rlin

Let’s say you have a data entry form or a MP3 ID3 tag editor form. The user clicks the “Clear” button. The more edit controls you have the less you want to write the code to clear them Well, here’s a better idea:

procedure TMainForm.btnClear(Sender: TObject);
var
iI: Integer;
begin
for iI := 0 to [...]

How to Create Control Arrays

Posted December 15th @ 1:55 pm by m3Rlin

Visual Basic allows programmers to create control arrays. If VB does, then how about Delphi? It sure does, but the whole idea is a bit different than in Visual Basic. You can do this to allow all controls to share a message handler (e.g. all the components can have an <i>OnClick</i> handler). For example, let’s [...]

« Previous EntriesNext Entries »