[Mono-winforms-list] Can't get form controls to show

Steve Ricketts velocedge at hotmail.com
Sat Apr 17 10:36:08 EDT 2010

I want to make certain controls visible on a form after certain events have
happened.  I use BackgroundWorker to avoid the treading issues but the
controls never appear on the form.  I set a breakpoint on setLogonValues and
it does break and each of lines in that function are executed, but they
never show on the form.  This works in Windows but not in Linux.

			BackgroundWorker bw = new BackgroundWorker ();

			bw.RunWorkerCompleted += setLogonValues;

			bw.RunWorkerAsync ();


		private void setLogonValues (object sender, RunWorkerCompletedEventArgs e)


			labLogOn.Visible = true;

			txtStudentID.Visible = true;

			btnLogOn.Visible = true;

			labStatus.Text = "";

			txtStudentID.Text = "";

			txtStudentID.Focus ();


I've also tried:

			txtStudentID.Invoke ((MethodInvoker)delegate { txtStudentID.Visible =
true; });

But that doesn't work either.  What am I doing wrong?

View this message in context: http://n4.nabble.com/Can-t-get-form-controls-to-show-tp2014166p2014166.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.

More information about the Mono-winforms-list mailing list