hrmm... seems weird. And it looks circular. And after testing..it is. It creates an infinite loop.
and thenCode:namespace Form1 { public partial class Form1: Form { public string StrText { get { return lbl_STRrate1.Text; } set { lbl_STRrate1.Text = value; } }
so instead, I am going to save a new variable in ClassBox and pass it to Form1 and have a function in Form1 that updates it stats. I think this might solve the circular problem.Code:class ClassBox : ComboBox { Form1.Form1 formtext = new Form1.Form1(); void SetCommonerStats() { int iStrength = 10 + Strength; string sStrength = Convert.ToString(iStrength); formtext.StrText = sStrength; }




Reply With Quote