Autor Beitrag
p!nhead
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35



BeitragVerfasst: Di 09.08.05 08:30 
huhu,

und schon die naechste frage... wahrscheinlich wieder simpel fuer euch, jedoch stundenlanges suchen fuer mich :)

wie kann ich ein bestimmtes item eines treeviews editieren? also nur den string der zeile

danke schonmal

gruss
Boris
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: Di 09.08.05 08:45 
Hallo,

damit rufst Du den Editiermodus auf:
ausblenden Delphi-Quelltext
1:
2:
if TreeView1.Selected <> nil then
  TreeView1.Selected.EditText;

Mit den Ereignissen OnEdited und OnEditing kannst Du auf die Eingaben reagieren.

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



BeitragVerfasst: Di 09.08.05 09:02 
das hab ich auch schon gefunden, allerdings denke ich das es nicht das ist was ich moechte.

ich gebe etwas in ein editfeld ein und bei onexit soll dieser text in dem vorher angewaehlten item des treeview's erscheinen.
cherry
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 136

WinXP - Professional
RAD Studio 2009
BeitragVerfasst: Di 09.08.05 09:26 
Dann doch einfach so:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
procedure Edit1Exit(Sender: TObject);
begin
 if TreeView1.Selected <> nil then  
  TreeView1.Selected.Text := Edit1.Text
end;
p!nhead Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 35



BeitragVerfasst: Di 09.08.05 09:30 
huch... hab ich die .text eigenschaft doch glatt uebersehen? (shame over me) :)

vielen dank
cherry
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 136

WinXP - Professional
RAD Studio 2009
BeitragVerfasst: Di 09.08.05 09:58 
Keine Ursache.. 8)