<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.mediamonkey.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gpswaney</id>
	<title>MediaMonkey Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.mediamonkey.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Gpswaney"/>
	<link rel="alternate" type="text/html" href="https://www.mediamonkey.com/wiki/Special:Contributions/Gpswaney"/>
	<updated>2026-05-23T20:47:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.4</generator>
	<entry>
		<id>https://www.mediamonkey.com/wiki/index.php?title=ISDBUI::AddPropertiesSheet&amp;diff=7462</id>
		<title>ISDBUI::AddPropertiesSheet</title>
		<link rel="alternate" type="text/html" href="https://www.mediamonkey.com/wiki/index.php?title=ISDBUI::AddPropertiesSheet&amp;diff=7462"/>
		<updated>2012-04-07T20:31:13Z</updated>

		<summary type="html">&lt;p&gt;Gpswaney: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{MethodDeclaration|SDBUI|ISDBUI|Function AddPropertiesSheet(SheetLabel As String, ScriptFile As String, InitProcedure As String, TrackChangeProcedure As String, SaveProcedure As String, Order As Integer) As Long}}&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
&lt;br /&gt;
{{MethodParameters &lt;br /&gt;
 |SheetLabel |String |A label that appears in the tab list of properties sheets (sheet name).&lt;br /&gt;
 |ScriptFile |String |A script file that contains event functions (InitProcedure, TrackChangeProcedure and SaveProcedure).&lt;br /&gt;
 |InitProcedure |String |A function from ScriptFile that is called when Properties dialog is created. There is one parameter present - a reference to the sheet ([[SDBUITranspPanel]] object)&lt;br /&gt;
 |TrackChangeProcedure |String |A function from ScriptFile that is called when track(s) are changed. Track(s) for those the properties are shown. There are two parameters presented - a reference to the tracks object ([[SDBSongData]] or [[SDBSongList]] object), object type identifier (0 - Object is [[SDBSongData]], 1 - Object is [[SDBSongList]])&lt;br /&gt;
 |SaveProcedure |String |A function from ScriptFile that is called when edited tracks(s) are to be saved (closed by OK button). There are three parameters presented - a reference to the sheet ([[SDBUITranspPanel]] object), a reference to the tracks object ([[SDBSongData]] or [[SDBSongList]]), object type identifier (0 - Object is [[SDBSongData]], 1 - Object is [[SDBSongList]])&lt;br /&gt;
 |Order |Integer | Order (Page index) of the newly added sheet. If the value is out of range (like -1) then the sheet is added as the last (rightmost).}}&lt;br /&gt;
&lt;br /&gt;
===Method description===&lt;br /&gt;
&lt;br /&gt;
Creates a new sheet that appears in Properties dialog.&lt;br /&gt;
&lt;br /&gt;
MediaMonkey 4.0&lt;br /&gt;
&lt;br /&gt;
===Example code===                    &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vb&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Option Explicit&lt;br /&gt;
&lt;br /&gt;
Sub OnStartUp&lt;br /&gt;
	Dim i : i = SDB.UI.AddPropertiesSheet(&amp;quot;Sample sheet&amp;quot;, Script.ScriptPath, &amp;quot;InitSheet&amp;quot;, &amp;quot;TrackChange&amp;quot;, &amp;quot;SaveSheet&amp;quot;, 2)&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
Sub InitSheet(Sheet)&lt;br /&gt;
	Dim UI : Set UI = SDB.UI&lt;br /&gt;
	Dim ini : Set ini = SDB.IniFile&lt;br /&gt;
	&lt;br /&gt;
	Dim a : Set a = UI.NewGroupBox(Sheet) : a.Caption = &amp;quot;Settings&amp;quot; : a.Common.SetRect 10, 10, 230, 210&lt;br /&gt;
&lt;br /&gt;
  Dim ch&lt;br /&gt;
  Set ch = UI.NewCheckbox(a)&lt;br /&gt;
  ch.Common.SetRect 15, 20, 250, 20&lt;br /&gt;
  ch.Common.ControlName = &amp;quot;CheckBox1&amp;quot; &lt;br /&gt;
  ch.Caption = &amp;quot;Update to ini file&amp;quot;&lt;br /&gt;
  ch.Checked = true&lt;br /&gt;
  &lt;br /&gt;
  Dim e&lt;br /&gt;
  Set e = UI.NewEdit(a)&lt;br /&gt;
  e.Common.SetRect 15, 50, 250, 50&lt;br /&gt;
  e.Common.ControlName = &amp;quot;EditBox1&amp;quot;&lt;br /&gt;
  e.Text = &amp;quot;Song Title&amp;quot;&lt;br /&gt;
  e.Common.Enabled = True&lt;br /&gt;
  &lt;br /&gt;
  SDB.Objects(&amp;quot;EditBox1&amp;quot;) = e&lt;br /&gt;
&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
Sub TrackChange( Object, ObjectType)&lt;br /&gt;
  Dim e: Set e = SDB.Objects(&amp;quot;EditBox1&amp;quot;)&lt;br /&gt;
  &lt;br /&gt;
  If ObjectType = 0 then &#039; it is just Song &lt;br /&gt;
    e.Text = Object.Title&lt;br /&gt;
  End If&lt;br /&gt;
    &lt;br /&gt;
  If ObjectType = 1 then &#039; it is SongList&lt;br /&gt;
    e.Text = Object.Count &amp;amp; &amp;quot; songs selected&amp;quot;&lt;br /&gt;
  End If&lt;br /&gt;
  &lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
Sub SaveSheet(Sheet, Object, ObjectType)&lt;br /&gt;
	Dim ini : Set ini = SDB.IniFile&lt;br /&gt;
&lt;br /&gt;
  If ObjectType = 0 then &#039; it is just Song &lt;br /&gt;
    If Sheet.Common.ChildControl(&amp;quot;CheckBox1&amp;quot;).Checked then&lt;br /&gt;
      ini.StringValue(&amp;quot;SampleScript&amp;quot;, &amp;quot;Updated Song&amp;quot;) = Object.Title&lt;br /&gt;
    End If   &lt;br /&gt;
  End If  &lt;br /&gt;
   &lt;br /&gt;
  If ObjectType = 1 then &#039; it is SongList   &lt;br /&gt;
    If Sheet.Common.ChildControl(&amp;quot;CheckBox1&amp;quot;).Checked then&lt;br /&gt;
      Dim i   &lt;br /&gt;
      For i = 0 to Object.Count-1&lt;br /&gt;
        ini.StringValue(&amp;quot;SampleScript&amp;quot;, &amp;quot;Updated Songs - Song &amp;quot; &amp;amp; i ) = Object.Item(i).Title&lt;br /&gt;
	    Next &lt;br /&gt;
    End If     &lt;br /&gt;
  End If   &lt;br /&gt;
  &lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Related Topics===&lt;br /&gt;
&lt;br /&gt;
*[[Sample Properties Sheets script]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting|{{PAGENAME}}]]&lt;br /&gt;
[[Category:Automation objects|{{PAGENAME}}]]&lt;br /&gt;
[[Category:CoClass SDBUI|{{PAGENAME}}]]&lt;br /&gt;
[[Category:Interface ISDBUI|{{PAGENAME}}]]&lt;/div&gt;</summary>
		<author><name>Gpswaney</name></author>
	</entry>
</feed>