Autor Beitrag
Spike
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 69
Erhaltene Danke: 1



BeitragVerfasst: Sa 22.02.03 16:48 
Hallo,

ich suche eine Komponente für Laufschrift mit transparentem Hintergrund.
Hab aber leider nichts gefunden. Hat jemand vielleicht einen Link für mich?

Danke
Spike
torstenheinze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 461



BeitragVerfasst: Sa 22.02.03 17:42 
ohne transparenten hintergrund könnte ich dir die rxlib's empfehlen
oder du machst ein label transparent und lässt es dann so über dein formular gleiten wie du es willst
Spike Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 69
Erhaltene Danke: 1



BeitragVerfasst: Sa 22.02.03 18:09 
ohne Transparenz hab ich hier was gefunden. Das nützt mir leider nichts obwohl es ne schone Komponente ist.
Und mit einem transp. Label und einem Timer hab ich rumgespielt. Das würde ich aber nur nehmen wenn ich nichts anderes finde. Das sieht nämlich doch ziemlich ruckelig aus.
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Sa 22.02.03 23:32 
Wenn du das Intervall des Timers klein genug stellst und dann entsprechend wenig verschiebst sollte es nicht ruckeln...
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: So 23.02.03 00:04 
also ich würde ein Label nehmen und in einem Timer die left pos ändern, und sobalt der Label an dem rand gestoßen ist wird einfach gesagt das er in die gegengesetzte richtig färht !!!

und Fertig !

_________________
MFG
Michael Springwald, "kann kein englisch...."
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: So 23.02.03 00:05 
YEP...
aber angeblich ruckelt das...
glaub ich aber nicht...

Ich hatte mal ne ganze Form gfemacht, die immer so über den Bildschirm "wandert" und das ging auch ganz gut...

Fiji-Fighter
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: So 23.02.03 00:18 
ich meine ich hätte sowas auch mal gemacht !
wenn man den Timer interaval auf 10.000 pack ist das kein wunder das ist ruckel(oder ?) :P
aber wenn der Timer inveral auf 1 ms gepackt wurde sollte das problem los gehen, oder man baut absichtlich noch zeit schleifen ein :P

_________________
MFG
Michael Springwald, "kann kein englisch...."
Spike Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 69
Erhaltene Danke: 1



BeitragVerfasst: So 23.02.03 09:42 
Stimmt, das ist ruckelfrei hinzubekommen.
Der Nachteil an der Sache ist aber, dass es bei längeren Textten nicht funzt weil der Text nicht zur Seite rausläuft und von der anderen Seite wieder reinkommt.

Also ich hab jetzt erst mal wie folgt gemacht:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
  if Length(Text)>0 then begin
    If Length(Label1.Caption)<Length(Text) then
      Label1.Caption := Copy(Text,1,Length(Label1.Caption)+1) else
      Label1.Caption := Label1.Caption+' ';
    If Label1.Canvas.TextWidth(Copy(Label1.Caption,Length(Text),Length(Label1.Caption)-Length(Text)))> Label1.Width then
       Label1.Caption := '';
  end;
end;

Das Label ist rechts justiert und Autosize ist false;
Mit einem TimerIntervall von 40 geht es so halbwegs. Bin aber noch nicht wirklich zufrieden damit.


Zuletzt bearbeitet von Spike am So 23.02.03 15:39, insgesamt 1-mal bearbeitet
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: So 23.02.03 14:57 
Dann must du denn Timer Interval auf 1 schalten.

Spike:
ausblenden Quelltext
1:
  If Length(Label1.Caption)<Length(Text) then					

warum nicht

ausblenden Quelltext
1:
  If Length(Label1.Caption)<Label1.With) then					


?

_________________
MFG
Michael Springwald, "kann kein englisch...."
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: So 23.02.03 15:02 
Das ist als würdesst du Länge mit Gewicht vergleichen :wink:

Width und Heigth bezeichnet die Größe der Komponente.
Length bezeichnet die Anzahl der Zeichen.

maxk

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: So 23.02.03 15:15 
OK!
Das ist mir klar, ich wollte auf was andres hinnaus, und zwar darauf wenn der text zu lang ist !
(Bin aber zu fauel den code jetzt zu schreiben dafür, werde ich mal später schreiben ;) )

_________________
MFG
Michael Springwald, "kann kein englisch...."
maxk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1696
Erhaltene Danke: 1

Win XP, Debian Lenny
Delphi 6 Personal
BeitragVerfasst: So 23.02.03 16:03 
ausblenden Quelltext
1:
2:
Canvas.Font:=Label1.Font;
if (Label1.Width)<(Canvas.TextWidth(Text) then //Text ist zu lang


maxk

_________________
Ein Computer wird das tun, was Du programmierst - nicht das, was Du willst.
City Light
Hält's aus hier
Beiträge: 15



BeitragVerfasst: Do 06.03.03 02:07 
Was haltet Ihr denn davon?

Gruß Tino
torstenheinze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 461



BeitragVerfasst: Do 06.03.03 15:43 
das gute an der timer und labelvariante gegenüber einer laufschrift komponente ist, das man den text ändern kann, und der text fängt nicht gleich wieder von vorne an zu scrollen.
Spike Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 69
Erhaltene Danke: 1



BeitragVerfasst: Fr 07.03.03 18:20 
City Light hat folgendes geschrieben:
Was haltet Ihr denn davon?

Läuft sehr schön flüssig und ist ja auch transparent. Aber das alte Problem: wenn das Label breiter ist als das Form dann geht nichts mehr.
Hab das ja für meinen Player gesucht. Und da hab ich noch nichts gefunden was mich wirklich zufriedenstellt :(
torstenheinze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 461



BeitragVerfasst: Fr 07.03.03 18:29 
ich schreib dir mal ne demo, wie ich dat prob lösen würde
torstenheinze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 461



BeitragVerfasst: Fr 07.03.03 19:04 
so, du hast pooost :lol:
Spike Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 69
Erhaltene Danke: 1



BeitragVerfasst: Fr 07.03.03 19:23 
Danke, sieht sehr gut aus - nun such ich nur noch einen Container für das Label der dann idealerweise transparent ist. So das der linke und rechte Rand nicht mit dem Form übereinstimmen muß :D
torstenheinze
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 461



BeitragVerfasst: Fr 07.03.03 19:30 
ich kann dir leider keine empfehlen :(
Spike Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 69
Erhaltene Danke: 1



BeitragVerfasst: Fr 07.03.03 19:35 
Ich hab auch noch nicht gescheites gefunden. Eventuell hilft ein separates Form.
Ich werde noch ein wenig probieren. Auf jeden Fall bin ich meinem Ziel schon ein gutes Stück näher.