Autor Beitrag
elduchte
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 199

Win 2000, Win XP
Delphi 7
BeitragVerfasst: Mi 05.03.03 18:52 
Hi Leute,
ich habe in meiner Form ein TBevel eingefügt. In dieser Komponente soll ein längerer Text stehen, der aber nicht über die Ränder des Bevels hinausgehen soll (Wordwrap). Dieses kann man ja mit TLabel schaffen, allerdings langt der Platz nicht, den TLabel zur Verfügung stellt. Gibt es hier eine Alternative (inkl. Wordwarp) ??

Danke für Eure Hilfe

Gruß
Andreas
Klabautermann
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Veteran
Beiträge: 6366
Erhaltene Danke: 60

Windows 7, Ubuntu
Delphi 7 Prof.
BeitragVerfasst: Mi 05.03.03 19:28 
Hallo,

was meinst du mit der Platz langt nicht? Du kannst das Label doch so groß machen wie du willst.

Oder verstehe ich dich falsch?

Gruß
Klabautermann
Spike
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 69
Erhaltene Danke: 1



BeitragVerfasst: Mi 05.03.03 19:59 
Meinst Du das Du nicht genug Text im Label unterbringen kannst?
Spricht was dagegen ein TMemo zu nehmen, Enabled auf false zu setzen und die Hintergrundfarbe anzupassen?
Da hättest du Zeilenumbruch und viel Platz für Text :)
elduchte Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 199

Win 2000, Win XP
Delphi 7
BeitragVerfasst: Mi 05.03.03 20:01 
Hallo,
wenn ich den Text im Objektinspektor unter Caption bei Tlabel eingebe, ist doch dort nur beschränkt Platz für Zeichen. Irgendwann nimmt TLabel keine Zeichen mehr an.
elduchte Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 199

Win 2000, Win XP
Delphi 7
BeitragVerfasst: Mi 05.03.03 20:14 
Hallo Spike,
guter Tipp, kam ich aber auch schon darauf. Wenn ich aber Enabled auf false setze, ist meine Schriftformatierung (Farbe) auch verloren gegangen.

Muss wohl mehrere Labels nehmen, um den Text unterzubringen....

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



BeitragVerfasst: Mi 05.03.03 20:16 
du kannst auch readonly aktivieren. und wenn man dann in das memo klickt, dann machst du das so, dass es wieder defocusiert wird
elduchte Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 199

Win 2000, Win XP
Delphi 7
BeitragVerfasst: Do 06.03.03 10:13 
Hi,
die Idee ist nicht schlecht..... und wie läuft das denn mit dem defocusieren?

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



BeitragVerfasst: Do 06.03.03 15:51 
1. erstelle einen button
2. mache seine eigenschaft top auf -200
3. mache in das onclick ereignis des memo folgenden text:
ausblenden Quelltext
1:
button1.SetFocus;					

4. Fertig

es gibt bestimmt einen besseren weg, aber im prinzip reicht auch so ein spagetti code :wink:
Andreas L.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1703
Erhaltene Danke: 25

Windows Vista / Windows 10
Delphi 2009 Pro (JVCL, DragDrop, rmKlever, ICS, EmbeddedWB, DEC, Indy)
BeitragVerfasst: Do 06.03.03 15:56 
Du kannst ja auch TStaticText oder ein umegbautes Memo verwenden!