ProgressBar en Treeview

share share <[email protected]>
Newsgroups gmane.comp.gnome.mono.hispano
Message-ID <[email protected]>
Hola estaba haciendo una aplicacion y me aparece el  siguiente advertencia:

 (Mp3SpiderDev:11288): GLib-GObject-WARNING **: IA__g_object_set_property:
object class `GtkCellRendererProgress' has no property named `progress'

aca el codigo

        private Controlador control;
        private Gtk.ListStore     musicListStore;

        public WinDownload(Controlador c)
        {
            control = c;
            this.Build();
            CreateStore();

            Gtk.ProgressBar p = new Gtk.ProgressBar();
            p.Orientation = Gtk.ProgressBarOrientation.LeftToRight;
            p.PulseStep = 0.1;

            this.musicListStore.AppendValues("1","artista - lalala",new
Gdk.Pixbuf("desmm_load_w.gif"),p,"4,19","2,1","44 kbps", "7 segs");


        }
        public void addDownload(DownloadLink dl, List<string> info) {

        }

        protected virtual void OnDeleteEvent (object o, Gtk.DeleteEventArgs
args)
        {
            args.RetVal = true;
            this.Visible = false;
        }

        public void CreateStore() {
            musicListStore = new Gtk.ListStore (typeof (string),typeof
(string),typeof(Gdk.Pixbuf), typeof (Gtk.ProgressBar),typeof (string),typeof
(string),typeof (string),typeof (string));
            Gtk.TreeViewColumn numDownload = new Gtk.TreeViewColumn ();
            numDownload.Title = "#";
            Gtk.CellRendererText numberCell = new Gtk.CellRendererText ();
            numDownload.PackStart (numberCell, true);


            Gtk.TreeViewColumn fileNameColumn = new Gtk.TreeViewColumn ();
            fileNameColumn.Title = "File Name";

            Gtk.CellRendererText fileNameCell = new Gtk.CellRendererText ();
            fileNameColumn.PackStart (fileNameCell, true);

            Gtk.TreeViewColumn statusColumn = new Gtk.TreeViewColumn ();
            statusColumn.Title = "Status";

            Gtk.CellRendererPixbuf statusCell = new Gtk.CellRendererPixbuf
();
            statusColumn.PackStart (statusCell, true);

            Gtk.TreeViewColumn progressColumn = new Gtk.TreeViewColumn ();
            progressColumn.Title = "Progress";

            Gtk.CellRendererProgress progressCell = new
Gtk.CellRendererProgress ();
            progressColumn.PackStart (progressCell, true);

            Gtk.TreeViewColumn fileSizeColumn = new Gtk.TreeViewColumn ();
            fileSizeColumn.Title = "FileSize";

            Gtk.CellRendererText fileSIzeCell = new Gtk.CellRendererText ();
            fileSizeColumn.PackStart (fileSIzeCell, true);

            Gtk.TreeViewColumn downloadedColumn = new Gtk.TreeViewColumn ();
            downloadedColumn.Title = "Downloaded";

            Gtk.CellRendererText downloadedCell = new Gtk.CellRendererText
();
            downloadedColumn.PackStart (downloadedCell, true);

            Gtk.TreeViewColumn speedColumn = new Gtk.TreeViewColumn ();
            speedColumn.Title = "Speed";

            Gtk.CellRendererText speedCell = new Gtk.CellRendererText ();
            speedColumn.PackStart (speedCell, true);

            Gtk.TreeViewColumn timeLeftColumn = new Gtk.TreeViewColumn ();
            timeLeftColumn.Title = "Time Left";

            Gtk.CellRendererText timeLeftCell = new Gtk.CellRendererText ();
            timeLeftColumn.PackStart (timeLeftCell, true);

            this.treeview2.AppendColumn (numDownload);
            this.treeview2.AppendColumn (fileNameColumn);
            this.treeview2.AppendColumn (statusColumn);
            this.treeview2.AppendColumn (progressColumn);
            this.treeview2.AppendColumn (fileSizeColumn);
            this.treeview2.AppendColumn (downloadedColumn);
            this.treeview2.AppendColumn (speedColumn);
            this.treeview2.AppendColumn (timeLeftColumn);


            numDownload.AddAttribute(numberCell,"text", 0);
            fileNameColumn.AddAttribute (fileNameCell, "text", 1);
            statusColumn.AddAttribute (statusCell, "pixbuf", 2);
            progressColumn.AddAttribute(progressCell,"progress",3);
            fileSizeColumn.AddAttribute(fileSIzeCell,"text", 4);
            downloadedColumn.AddAttribute (downloadedCell, "text",5);
            speedColumn.AddAttribute (speedCell, "text", 6);
            timeLeftColumn.AddAttribute(timeLeftCell,"text",7);

            this.treeview2.Model = musicListStore;
        }

Saludos!

_______________________________________________
Mono-hispano mailing list
[email protected]
https://listas.hispalinux.es/mailman/listinfo/mono-hispano
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.