I have tried to change the ForeColor and BackColor of a RACB token, but the styling doesn't appear when i add the tokens. Is it not possible to change the colors from code-behind?
Here is my code:
Here is my code:
foreach
(
string
chemical
in
chemicalsArrayList)
{
AutoCompleteBoxEntry entry =
new
AutoCompleteBoxEntry();
chemicalBC = BCFactory.ChemicalBC;
DataSet dsClassifications = chemicalBC.GetClassificationByChemicalName(chemical);
entry.Text = chemical;
if
(dsClassifications.Tables[0].Rows.Count != 0)
{
entry.ToolTip = dsClassifications.Tables[0].Rows[0][0].ToString();
entry.ForeColor = System.Drawing.ColorTranslator.FromHtml(
"#"
+ dsClassifications.Tables[0].Rows[0][
"Color"
].ToString());
}
else
{
entry.ToolTip =
""
;
}
racbChemicals.Entries.Add(entry);
}