Autor Beitrag
kronoide
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51



BeitragVerfasst: So 15.07.07 21:17 
Hallo Community,

Also ich habe diesen code:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm2.FormCreate(Sender: TObject);
begin
memo1.lines[0] := 'Test:' + form1.ComboBox1.SelText;
end;


der ausgewählte text in der combobox soll im memo stehen nur leider zeigt er dann im form 2 memo nichts nach dem 'test:'

was ist da falsch?
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: So 15.07.07 21:33 
Hallo,

setz den Text in das Memo bevor Du die Form anzeigst.

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
kronoide Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51



BeitragVerfasst: So 15.07.07 21:45 
ich vertsehe nicht ganz, also wenn ich das in form 1 bei button1.click for fomr2.showmodal setze dann kann er memo1 nicht finden
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: So 15.07.07 21:56 
Hallo,

Du musst ihm auch sagen das Du das Memo auf der Form2 meinst:
ausblenden Delphi-Quelltext
1:
Form2.Memo1.Lines.Add(ComboBox1.SelText);					

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mo 16.07.07 03:15 
SelText könnte auch der falsche Ansatz sein, da SelText nur dann nicht '' ist, wenn auch ein Text markiert, d.h. blau hinterlegt ist, in der CB. Benutze statt dessen Combobox.Text oder Combobox.Items[ComboBox.ItemIndex]

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
kronoide Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 51



BeitragVerfasst: Mo 16.07.07 10:01 
funktioniert jetzt, danke