I’m starting to study Gtk4 made available by https://juliagtk.github.io/Gtk4.jl/dev/manual/layout/#GtkGrid
And I managed to run the example:
win = GtkWindow("A new window")
g = GtkGrid()
a = GtkEntry() # a widget for entering text
a.text = "This is Gtk!"
b = GtkCheckButton("Check me!")
c = GtkScale(:h, 0:10) # a slider
# Now let's place these graphical elements into the Grid:
g[1,1] = a # Cartesian coordinates, g[x,y]
g[2,1] = b
g[1:2,2] = c # spans both columns
g.column_homogeneous = true # grid forces columns to have the same width
g.column_spacing = 15 # introduce a 15-pixel gap between columns
push!(win, g)
However, if you comment on lines 9 and 11 (a and c), GtkCheckButton b appears in position (1,1) instead of the specification (2,1)
win = GtkWindow("A new window")
g = GtkGrid()
a = GtkEntry() # a widget for entering text
a.text = "This is Gtk!"
b = GtkCheckButton("Check me!")
c = GtkScale(:h, 0:10) # a slider
# Now let's place these graphical elements into the Grid:
#g[1,1] = a # Cartesian coordinates, g[x,y]
g[2,1] = b
#g[1:2,2] = c # spans both columns
g.column_homogeneous = true # grid forces columns to have the same width
g.column_spacing = 15 # introduce a 15-pixel gap between columns
push!(win, g)
Could anyone help me understand the reason for this?