Hi.
Are there anyone out there that are using the Elpack from Eldos containing Eltree??.. If there are - I could use some help
...
I have problems using Inplace editors in an ElTree. I wanna build an ElTree witch contains a textfield, a button and an editfield. The first two are okey, but I'm clueless about creating the editfield.
I've made the button using Style like this :
...
var
fitem : TElTreeItem;
Style : TElCellStyle;
begin
ElTree1.Items.BeginUpdate;
ElTree1.Items.Clear;
fitem := ElTree1.Items.AddItem(nil);
fitem.UseStyles := true;
fitem.MainStyle.OwnerProps := true;
// add a style for second column
Style := fitem.AddStyle;
Style.OwnerProps := false;
Style.Control := TElCellButton.Create;
TElCellButton(Style.Control).Caption := 'Test';
TElCellButton(Style.Control).OnClick := OnEltreeClick;
end;
...
..but if I have understood correctly there are no Editfields to use as a style?
I asume that the way to get an editfield into an ElTree is to use the Inplace Editors. I have added a TElTreeInplaceEdit and linked it to the tree(using the Tree property), but I can't find out how to actually show/use it in the tree.
Any help will be gladly accepted
There are probably other good ways of building this? I have created it manualy containing TLabel, TEdit and TButton, but it really made a messy code, so I didn't like it..
-Stian
Are there anyone out there that are using the Elpack from Eldos containing Eltree??.. If there are - I could use some help
I have problems using Inplace editors in an ElTree. I wanna build an ElTree witch contains a textfield, a button and an editfield. The first two are okey, but I'm clueless about creating the editfield.
I've made the button using Style like this :
...
var
fitem : TElTreeItem;
Style : TElCellStyle;
begin
ElTree1.Items.BeginUpdate;
ElTree1.Items.Clear;
fitem := ElTree1.Items.AddItem(nil);
fitem.UseStyles := true;
fitem.MainStyle.OwnerProps := true;
// add a style for second column
Style := fitem.AddStyle;
Style.OwnerProps := false;
Style.Control := TElCellButton.Create;
TElCellButton(Style.Control).Caption := 'Test';
TElCellButton(Style.Control).OnClick := OnEltreeClick;
end;
...
..but if I have understood correctly there are no Editfields to use as a style?
I asume that the way to get an editfield into an ElTree is to use the Inplace Editors. I have added a TElTreeInplaceEdit and linked it to the tree(using the Tree property), but I can't find out how to actually show/use it in the tree.
Any help will be gladly accepted
There are probably other good ways of building this? I have created it manualy containing TLabel, TEdit and TButton, but it really made a messy code, so I didn't like it..
-Stian