i have a Button in a stiForm with this code:
if (CheckedListBoxControl4.SelectedIndex >= 0)
{
for (int i=0; i<CheckedListBoxControl4.Control.CheckedItems.Count; i++)
{
string vari = CheckedListBoxControl4.Control.CheckedItems.ToString();
Hotel_Meals_TBL.First();
while (!Hotel_Meals_TBL.IsEof)
{
switch(vari)
{
case ("GOLDEN PALACE") :
chkGOLDENPALACE.Checked = true;
chkGOLDENPALACE.ForeColor = Color.Red;
break;
case ("KHEMARA BATTAMBANG") :
chkKHEMARABATTAMBANG.Checked = true;
txtKHEMARABATTAMBANG.Brush =new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Red);
break;
case ("LA VILLA") :
chkLAVILLA.Checked = true;
break;
}
Hotel_Meals_TBL.Next();
}
}
}
when a CheckedBox is checked(true) i wish change the ForeColor of the TextBox but with my code i can not.
Where i wrong in my code?
Thanks for your attention.
Have a good day.
Cheers