Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Gtk Spinner Not Appearing #543

Closed
yadmtr opened this issue Dec 20, 2020 · 0 comments
Closed

Gtk Spinner Not Appearing #543

yadmtr opened this issue Dec 20, 2020 · 0 comments

Comments

@yadmtr
Copy link

yadmtr commented Dec 20, 2020

In this example Spinner Not Appearing: (Julia 1.5.3)

using Gtk
btn = GtkButton("Start")
sp = GtkSpinner()
ent = GtkEntry()

grid = GtkGrid()
grid[1,1] = btn
grid[2,1] = sp
grid[1:2,2] = ent
id = addprocs(1)[1]
signal_connect(btn, "clicked") do widget
 start(sp)
 @Gtk.sigatom begin
   @async begin
    s = @fetchfrom id begin
      sleep(4)
      return "I am back"
    end
    @Gtk.sigatom begin
      stop(sp)
      set_gtk_property!(ent,:text,s)
    end
  end
 end
end
win = GtkWindow(grid, "Progress Bar", 200, 200)
showall(win)
@yadmtr yadmtr closed this as completed Jun 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant