If i open the option sheet and go my sheet, i see the text stored in the ini-file. After that i go to another option sheet and go back, then i see in the multiline edit boxes the name i set with Common.ControlName !?!
Here is the code :
Code: Select all
Sub InitSheet(Sheet)
...
Dim GroupBox1
Set GroupBox1 = UI.NewGroupBox(Sheet)
GroupBox1.Caption = "Enter the keywords for linking with discogs (one keyword per line)"
GroupBox1.Common.Hint = "If you don't know what to enter here, let the keywords as is !!"
GroupBox1.Common.SetRect 10, 180, 500, 260
Set Label2 = UI.NewLabel(GroupBox1)
Label2.Common.SetRect 20, 20, 150, 25
Label2.Caption = SDB.Localize("Lyricist")
Set EditLyricist = UI.NewMultiLineEdit(GroupBox1)
EditLyricist.Common.SetRect 20, 35, 150, 75
EditLyricist.Common.ControlName = "LyricistKeywords"
tmp = Split(LyricistKeywords, "|")
editText = ""
For each x in tmp
editText = editText & x & Chr(13)
Next
EditLyricist.Text = Left(editText, Len(editText)-1)
...
End Sub
Sub SaveSheet(Sheet)
...
Dim tmp, x, editText
Set edt = Sheet.Common.ChildControl("LyricistKeywords")
tmp = Split(edt.Text, Chr(13) & Chr(10))
editText = ""
For each x in tmp
editText = editText & Trim(x) & "|"
Next
ini.StringValue("DiscogsAutoTagWeb", "LyricistKeywords") = Left(editText, Len(editText)-1)
...
End Sub
The second time...
What do i wrong ?