I have this code on my child form
public string texttest
{
get
{
return studentIDtextEdit.Text;
}
set
{
studentIDtextEdit.Text = value;
}
}
and this for my Parent form
private readonly student studentForm = new student();
private void barButtonItem2_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
MessageBox.Show(studentForm.texttest);
}
i was expecting that when i clicked the button on the parent form it will show me the message what i typed on the child form through the message box on the parent form. i have no idea why i will get an empty string on the message, the message box doesn't show any message.
I also tried to set the modifier of the text box into public but still i cant access it to another form on the parent form.