I have a custom ToolPart that reads from a database, but you could change it to read from a SPList instead
public class CustomToolPart : ToolPart {
protected override void CreateChildControls() {
ddlCustom = new DropDownList();
ddlCustom.ID = "ddlCustom";
ddlCustom.ToolTip = "Custom";
try {
using (SqlConnection conn = new SqlConnection(this.webPart.ConnectionString)) {
conn.Open();
SqlCommand cmd = new SqlCommand(@"select id,name from [sometableftdb_forums]", conn);
SqlDataAdapter rs = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
rs.Fill(ds, "Data");
ddlCustom.DataSource = ds;
ddlCustom.DataTextField = "name";
ddlCustom.DataValueField = "id";
ddlCustom.DataBind();
ddlCustom.Items.Insert(0, new ListItem("(choose)", "0"));
}
//instead add code here for SPSite/SPWeb/SPList
} catch (SqlException ex) {
ddlCustom.Items.Insert(0, new ListItem("(sql error)", "0"));
}
ListItem item = ddlCustom.Items.FindByValue((webPart != null ? webPart.CustomValueId : 0).ToString());
if (item != null) {
ddlCustom.SelectedIndex = -1;
item.Selected = true;
}
Controls.Add(ddlCustom);
}
}