Gtk.jl
Gtk.jl copied to clipboard
Gtk.GtkWindowPosition.CENTER doesn't work
using Gtk
win = GtkWindow("My First Gtk.jl Program", 400, 200)
win.window_position[Int] = Gtk.GtkWindowPosition.CENTER
showall(win)
window at top-left
yes indeed. doesn't work here either
- is gtk_window_set_position called?
- gtk docu says: "Window placement can be influenced using this enumeration. Note that using GTK_WIN_POS_CENTER_ALWAYS is almost always a bad idea. It won’t necessarily work well with all window managers or on all windowing systems."
You can use Gtk.GAccessor.position(win, Gtk.GtkWindowPosition.CENTER)
to call gtk_window_set_position but it doesn't seem to work so well.
There's also gtk_window_move:
https://github.com/JuliaGraphics/Gtk.jl/blob/fe6739a3a345ba804030c8d379daa15f30055903/gen/gbox3#L4984
using Gtk, Gtk.ShortNames
# Create window
mainWin = Window()
# Properties for mainWin
set_gtk_property!(mainWin, :title, "SimBioReactor 1.0")
set_gtk_property!(mainWin, :window_position, 3)
Duplicate of #396
@xetum @tknopp issue was solved?
@Kelvyn88 not yet solved as of Gtk.jl 1.2.2