folgendes Stückchen Code hab ich aus Delphi direkt in Lazarus kopiert.
Code: Alles auswählen
q_temp.SQL.Text := ' SELECT * FROM b_maxrabatt ';
q_temp.Open;
for i := 1 to 30 do
begin
with (FindComponent('l_prgr' + IntToStr(i)) as TLabel) do
begin
Caption := 'RG ' + q_temp.FieldByName('prgr').AsString + ' - ' +
q_temp.FieldByName('rabatt').AsString + '%';
Hint := q_temp.FieldByName('lieferant').AsString;
Tag := q_temp.FieldByName('rabatt').AsInteger;
end;
q_temp.Next;
end;
Code: Alles auswählen
// Check if GetTextBuf is overridden, otherwise
// we can call RealGetText directly
if TMethod(@Self.GetTextBuf).Code = Pointer(@TControl.GetTextBuf)
Danke!