Autor Beitrag
tmkb
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59



BeitragVerfasst: Mi 15.01.03 16:10 
Hallo,

Ich habe folgendes in einem Label:
ausblenden Quelltext
1:
wort1=wort2					


Kann mir jemand kurz sagen, wie ich jetzt "wort1" in das label2 schreibe und "wort2" ins label3.
Danke für Hilfe!
tmkb
Savage
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 110



BeitragVerfasst: Mi 15.01.03 16:24 
Hi,
das funktioniert mit den Funktionen copy und pos.

Also wenn label1.caption = 'wort1=wort2' ist, denn müsste es in etwa so funktionieren:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
var s : String;
...
s := label1.caption;
label2.caption := copy(s, 1, pos('=',s) - 1 );
label3.caption := copy(s, pos('=',s)+1, length(s)-pos('=',s) );
...


MfG
Savage
tmkb Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59



BeitragVerfasst: Mi 15.01.03 17:14 
danke, hat geklappt!