I guess nobody knows how to do this, all i wanted help with is how to store/assign different values and information to a new created treenode, then recall this stored values when i later click on the coresponding node.
i think i should try roo's way again, i got very close to it working and...
very informative thank you, will get to this once i figure the basics, i have had an attempt at changing the attachment i posted, but to no avail, im not even sure if im declaring things right, and do i still need the array?
type
TSoundItem = class(TObject)
FileName: String...
hi, feel free to input your say its much appreciated.
im going to have to redo most of it so far then i think, also the assigned data to the nodes needs to be saved to disk, so whenever i close the program, and open the saved file at a later date the assigned data can be recalled.
i need to do...
Hi Glenn, i have made up a quick a project attachment,
just right click the treeview and select the add child, as you can see the sound form opens. if you load a sound (i included 3) and change the volume, loop etc and then click ok, if you could repeat this say twice (add another child etc..)...
ok, it remembers the properties but only for one child node, whenever i add a new child the other childs properties are forgotten - most likely because im not assigning it correctly, you posted this line:
// this is where you add the node to the TTreeView
TNode := TTreeView.Items.AddChild(...)...
ok apologies for any mixups in the thread, this is what i have now which i hope you can inspect and point me to where i might be going wrong:
type
TSoundItem = record
FileName: String;
FileExtension: String;
Loop: Boolean;
Volume: Integer;
end;
var
frmSoundProperties...
well im a bit confused, here is what i have so far, how would i change it to a record type?
type
TSoundItem = class(TObject)
FileName: String;
FileExtension: String;
Loop: Boolean;
Volume: Integer;
end;
var
frmSoundProperties: TfrmSoundProperties;
SoundItemArray...
something like this to declare it?
type
TSoundItem = class(TObject)
FileName: String;
FileExtension: String;
Loop: Boolean;
Volume: Integer;
end;
var
frmSoundProperties: TfrmSoundProperties;
SoundItemArray: Array[0..3] of TSoundItem;
hi, sorry i kind of started answering my own questions.
ok i can play the wave files from memory stream, that is fine.
type
TSoundItem = class(TObject)
FileName: String;
FileExtension: String;
Loop: Boolean;
Volume: Integer;
end;
what i need to know how to do is associate...
so each time a new child is added and i load a sound, i need to store in memory the parameters, and recall them.
i need to know how to assign such data, im going along the lines of:
type
TSoundItem = class(TObject)
FileName: String;
FileExtension: String;
Loop: Boolean...
ok excuse me for bad coding, ive never dealt with anything like this, its my first time trying something like this.
i have a treeview, which i add child nodes to during run-time. when a child is added a form is shown where i can load my midi, wav files, what im trying to do is get the filename...
Hi, here is a quick introduction to what im trying to do:
load sounds (midi,mp3,wav) into a memory stream, then when called determine from the memory stream what type of file it is and play it.
im not a expert coder and am always keen to learn, code samples is easiest way for me to do this...
Hi, normally when i deal with treeviews that have more then one level, i can get the parent of the child by doing something like:
ShowMessage(TreeView1.Selected.Parent.Text);
if say i know it is 2 levels down the tree i would use:
ShowMessage(TreeView1.Selected.Parent.Parent.Text);
which...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.