Einzelnen Beitrag anzeigen

marabu

Registriert seit: 6. Apr 2005
10.109 Beiträge
 
#8

Re: Checkbox - Problem mit der Reihenfolge

  Alt 1. Feb 2008, 13:30
Hier die gewünschte Erklärung in Code-Form:

Delphi-Quellcode:
var
  s: TStrings
begin
  // ...
  for i := 0 to Pred(MAX_BOXES) do
    s.Add(Format('%s wert %s LIKE %s', [
      IfThen(s.Count = 1, ' AND'),
      IfThen(not Boxes[i].Checked, 'NOT'),
      QuotedStr('%' + Boxes[i].Name + '%')
    ]));
  sText := sText + s.Text;
  s.Free;
  // ...
end;
Getippt und nicht getestet.
  Mit Zitat antworten Zitat