Beispiel #1
0
void ArrangeAlignment::BuildIDSDropList(const CGadgetID DropListID,
		const INT32* IDSList, INT32 Default)
{
	// Make sure the list is empty
	DeleteAllValues(DropListID);

	// build the list
	String_32 Str;
	INT32 i=0;
	while (IDSList[i])
	{
		Str.MakeMsg(IDSList[i]);
		SetStringGadgetValue( DropListID, Str );
		i++;
	}
	SetComboListLength(DropListID);

	// select one of the entries in the list
	if (Default<0 || Default>=i)
	{
		ERROR3("BuildIDSDropList() passed a default outside the list");
		Default=0;
	}
	SetSelectedValueIndex(DropListID,Default);
}