Initiailize TParamListBox items?

How are we supposed to initialize the values of items in the TParamListBox? I didn't see any "OnParamInit" type of callback. Do we manually do it in the constructor or is there a better event handler to do it?

I came up with a way in the constructor using the Parameter["string"] method, but now I wonder how do you set the "Parameter Extra" items for the html? I want to assign the list options when I initialize the values that way I only have to maintain the string value mapping in one location (I have to map the href list item to an index).

I see the OnParamList can be used and works, but if I clear out the other items, the size of the dropdown is still containing the items that were setup in the "parameter extra". I'll just remove from there, here's what I did.

void __fastcall TSettingsForm::ParamListBox1ParamList(TObject *Sender, int idx, UnicodeString href,
					TStringList *values, bool &DoPopup)
{
	sHRefToSetting *p=Settings.FindHRef(href.t_str());
	assert(p && p->DataType==sHRefToSetting::TYPElist);
	values->Clear();
	String s=p->ListData;
	int lastpos=1;
	int pos=1;
	do {
		while (pos<=s.Length() && s[pos]!='|') {
			pos++;
		}
		values->Add(s.SubString(lastpos, pos-lastpos));
		pos++;
		lastpos=pos;
	} while (pos<=s.Length());

	DoPopup=true;
}

This is from the props attribute for the list item
Example:

<a href="list" class="LIST" props="List item 1|List item 2|List item 3|List item 4">List item 2</A>

When you clear this list that is normally passed via OnParamList, the default values should be cleared and not visible. I cannot see a different behavior here.

Yes, I just remove them. One more issue I've come across, if I have a custom edit item (may be any edit item) and when setting it to an empty string, you can't click on it to change the value.

When the value is an empty string, set the parameter value in the control to ParamListBox.EmptyParam