Python Forum
Update Gtk.Label in for-loop
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Update Gtk.Label in for-loop
#3
for zahl in range(start, end+1):
                function(self, zahl, steps, counter, prim_counter)
                counter +=1

                if not numlist:
                    if not divlist:
                        if zahl > 1:
                            prim_counter += 1
                    elif divlist:
                        kpt_counter += 1
                elif numlist == divlist:
                    if (sqrt(zahl).is_integer()):
                        psq_counter += 1
                    else:
                        pt_counter +=1
                if numlist != divlist:
                    gt_counter += 1
                val = self.progressbar.get_fraction() + 1/end
                self.progressbar.set_fraction(val)
This is the code, after changing the Label to a Progressbar (as you can see.)
But it won't work too.

There's no exception, It's just not working.
Only at the end, the progressbar is completely filled.
It's only kinda bar, not a "progress"bar..
Reply


Messages In This Thread
Update Gtk.Label in for-loop - by TimeMen - Jun-07-2018, 04:29 PM
RE: Update Gtk.Label in for-loop - by buran - Jun-07-2018, 04:30 PM
RE: Update Gtk.Label in for-loop - by TimeMen - Jun-07-2018, 07:46 PM
RE: Update Gtk.Label in for-loop - by killerrex - Jun-07-2018, 10:33 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] Update label if there are no records in treeview TomasSanchexx 1 1,006 Aug-20-2023, 04:45 PM
Last Post: menator01
  [Tkinter] Can't update label in new tk window, object has no attribute tompranks 3 3,704 Aug-30-2022, 08:44 AM
Last Post: tompranks
  update text variable on label with keypress knoxvilles_joker 3 5,080 Apr-17-2021, 11:21 PM
Last Post: knoxvilles_joker
  [Tkinter] how to update label text from list Roshan 8 5,617 Apr-25-2020, 08:04 AM
Last Post: Roshan
  Update a label text from subprocess jim53 3 4,444 Aug-19-2019, 08:21 PM
Last Post: Denni
  Unable to update or refresh label text in tkinter jenkins43 3 6,774 Jul-24-2019, 02:09 PM
Last Post: Friend
  Display and update the label text which display the serial value jenkins43 5 9,202 Feb-04-2019, 04:36 AM
Last Post: Larz60+
  [Tkinter] can't update label to include variable foxtreat 2 3,726 Dec-01-2018, 07:16 AM
Last Post: jfong
  [PyQt] label doesn't update on each iteration daa 5 18,470 Dec-12-2016, 06:26 PM
Last Post: daa
  [Tkinter] How to update the gui in a loop without blocking the gui mainloop Qnuba 2 65,807 Nov-12-2016, 04:33 PM
Last Post: Qnuba

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020