techno
techno

Reputation: 6500

Access Progress Bar in a separate window by code in another window

I have a GTK C# Application.During a long computation it is required to show the progress bar.I show this in a new window.But i dont know how to access the progress bar from another window ie:Main window.In winforms there was an access modifier i used to set it to public.In the properties in Xamarin studio its not there.

myapp.Window1 w = new myapp.Window1 ();
    w.Show ();

I want something like this w.mycoolprogressbar and update it from Main Window

Upvotes: 0

Views: 157

Answers (1)

Kristof
Kristof

Reputation: 445

If you're using stetic to design your dialog boxes, then every container/widget will be private.

Why don't you (maybe you did, the question is quite old now) add some public method to update the progress bar?

So you'll have the following calling code:

var progressDialog = new ProgressDialog();

...

progressDialog.UpdateProgress(progress);

On the other hand:

public partial class ProgressDialog : Gtk.Dialog
{

   ...

    public void UpdateProgress(double progress)
    {
        ...
    }
}

Upvotes: 1

Related Questions