Page 1 of 1

Wave Audio -- adding a waveitem at design time

PostPosted: May 21st, 2011, 4:05 pm
by simonbuk
How do you add a wav file as TWaveItem (in TWaveCollection) at design time? I done this dozens of times with other components (e.g. ImageLists) but I just can't work out how to do it with TWaveCollection, not even after scouring the documentation and working through the forum messages.

Simon

Re: Wave Audio -- adding a waveitem at design time

PostPosted: May 21st, 2011, 5:44 pm
by simonbuk
I don't have any problem with this in Delphi 7, so it must something to do with using Delphi 2010, or maybe the way it's set up on my system.

Re: Wave Audio -- adding a waveitem at design time

PostPosted: May 21st, 2011, 6:01 pm
by Kambiz
Please try this:

Code: Select all
NewItem := WaveCollection1.Waves.Add;
NewItem.Wave.LoadFromFile(FileName);

Re: Wave Audio -- adding a waveitem at design time

PostPosted: May 21st, 2011, 6:11 pm
by Kambiz
Opps! Your question is about design time. I checked it out in Delphi 2010, and found nothing wrong.

  1. In the object inspector, select the Waves property and click eclipses in front of it to bring up the collection editor.
  2. Add a new wave item by clicking on the new item icon of the toolbar.
  3. Select the Wave property of new wave item, and click eclipses in front of it to show the wave property editor.

Re: Wave Audio -- adding a waveitem at design time

PostPosted: May 22nd, 2011, 9:34 am
by simonbuk
Problem solved -- mainly my fault. Thanks a lot.

Simon