![]() |
fehler beim einfügen in TMemo
versuche mit
Delphi-Quellcode:
rauskommen soll z.B.
procedure TEditor.Button1Click(Sender: TObject);
var I,Y : Integer; begin Memo1.Lines.Add('BILD'+InttoStr(Bild)+' : Array [0..26] of Byte = ('); For I := 2 to 30 do Begin If (I <> 11) and (I <> 21) and (TPanel(FindComponent('Panel' + IntToStr(I))).Color = clBtnFace) then Begin If (I < 30) then Memo1.Text := Memo1.Text +'0,' else Memo1.Text := Memo1.Text +'0' End; BILD1 : Array [0..26] of Byte = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0); rauskommen tut BILD1 : Array [0..26] of Byte = ( 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0); was kann ich ändern |
Re: fehler beim einfügen in TMemo
Wenn ich Dich richtig verstanden habe, gehts nur um den Zeilenumbruch?
Delphi-Quellcode:
procedure TEditor.Button1Click(Sender: TObject);
var i,y : integer; s: string; begin s:=''; for i := 2 to 30 do begin if (i <> 11) and (i <> 21) and (TPanel(FindComponent('Panel' + IntToStr(i))).Color = clBtnFace) then begin if (i < 30) then s := s +'0,' else s := s +'0'; end; end; Memo1.Lines.Add('BILD'+InttoStr(Bild)+' : Array [0..26] of Byte = ('+s+')'); end; |
Re: fehler beim einfügen in TMemo
Memo1.Lines.Add fügt schon einen Zeilenvorschub ein.
|
Re: fehler beim einfügen in TMemo
Hallo,
am einfachsten ist der Umweg über eine lokale String-Variable. Fülle die erst mal komplett und dann Memo.Text:= sString; Heiko |
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:02 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz