Autor Beitrag
Pegasusowl
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Do 27.07.06 11:28 
Hallo..ich lese mittels eines ONTIMER Ereignis ein Memofeld immer wieder ein. Der inhalt ändert sich auch.

Dann sollen bestimmte Grafiken darauf reagieren. Das habe ich mittels der Zeile

ausblenden Delphi-Quelltext
1:
2:
if Pos(Edit1.Text,memo1.Lines.Text) > 0 then ImageList1.Draw(Image1.Canvas,0,0,0)
  else ImageList1.Draw(Image1.Canvas,0,0,1);


gelöst....ABER irgendwie bleibt der Inhalt der Images immer gleich.
Muss man noch etwas tun damit ich von der einen Grafik dann auf die andere wechsel?
ein redraw oder sowas?

Moderiert von user profile iconChristian S.: Delphi-Tags hinzugefügt
Pegasusowl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 22



BeitragVerfasst: Do 27.07.06 11:58 
auch wenn ich das ganze per button mache ändert sich die grafik nicht....
Sie ändert sich ausschliesslich bei starten des Programmes.....

Vielleicht hilft das zur Lösung?
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Do 27.07.06 12:04 
und dann ruf bitte

ausblenden Delphi-Quelltext
1:
 image1.refresh;					


auf und schon gehts =)

Lg
Stefan

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
joker0000
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 70

Win XP
Delphi 2006
BeitragVerfasst: Do 15.02.07 23:02 
so, nochma diesen alten thread herausgekramt, weil noch gut übersichtlich ;). also ich hab n problem. ich lass über mehrere buttons unterschiedliche diagramme auf ein image zeichnen. da will ich natürlich nicht ein altes als hintegrund behalten ;). dachte mir auch, dass es mit
 image1.refresh; (*oder*) image1.canvas.refresh;
geht, aber beides bringt absolut nichts, als würde die zeile gar nicht existieren. hat jemand ne idee, woran das liegen könnte?
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Do 15.02.07 23:21 
Hi!

Wie meinst du das mit zeichnen?
Wie bringst du die Diagramme auf das Image?

LG
Stefan

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
joker0000
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 70

Win XP
Delphi 2006
BeitragVerfasst: Fr 16.02.07 08:34 
ganz einfach über image1.canvas.moveto/lineto, image1.canvas.textout, image1.canvas.rectangle.
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Fr 16.02.07 10:46 
Guten Morgen!

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
var Rect: TRect;
begin
 Rect:= DeinImage.Canvas.ClipRect;
 DeinImage.Canvas.FillRect(Rect);
end;


LG
Stefan

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
joker0000
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 70

Win XP
Delphi 2006
BeitragVerfasst: So 18.02.07 17:38 
danke, klappt super. kannst du mir noch erklären, was eigentlich da passiert und warum denn refresh nicht funktioniert?
joker0000
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 70

Win XP
Delphi 2006
BeitragVerfasst: Mo 19.02.07 20:23 
ok, ich weiß unerwünschtes schiebeposting. die funktion passt doch jetzt im prinzip ein rechteck an das image an (größe) und dann wird das image mit dem rechteck übermalt. seh ich das richtig? geht das nciht eleganter?
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mo 19.02.07 20:34 
Ist kein Schiebeposting =)

Hmm eleganter..mir fällt nix ein!
Gehts nicht schnell genug?
oder warum möchtest du es nicht benutzen?
Irgendwie musst du die Leinwand (Canvas) ja leeren!

Aber ich probier mal n bisschen rum :)

LG
Stefan

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
joker0000
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 70

Win XP
Delphi 2006
BeitragVerfasst: Mo 19.02.07 20:50 
was mich noch immer sehr wundert, warum die funktion refresh existiert aber keine veränderungen mit sich bringt. so ist es ja auch ok, wenn ich das jetzt richtig erfasst hab...
ZeitGeist87
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1593
Erhaltene Danke: 20

Win95-Win10
Delphi 10 Seattle, Rad Studio 2007, Delphi 7 Prof., C++, WSH, Turbo Pascal, PHP, Delphi X2
BeitragVerfasst: Mo 19.02.07 21:04 
refresh <> renew :)

Refresh dient einfach nur dazu, ein neuzeichnen zu erzwingen...

LG
Stefan

_________________
Wer Provokationen, Ironie, Sarkasmus oder Zynismus herauslesen kann soll sie ignorieren um den Inhalt meiner Beiträge ungetrübt erfassen zu können.
Saubäär
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 376



BeitragVerfasst: Mo 19.02.07 21:06 
Hi joker,

schreib mal:

ausblenden Delphi-Quelltext
1:
Image1.Picture := nil;					


Gruß

Saubäär
joker0000
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 70

Win XP
Delphi 2006
BeitragVerfasst: Mo 19.02.07 21:06 
ok, das wusste ich nicht, danke