lawsie/guizero

The grid layout is not displayed according to coordinates, more like displaying the order and size of coordinates

yingjie52 opened this issue · 4 comments

Describe the bug
The grid layout is not displayed according to coordinates, more like displaying the order and size of coordinates

To Reproduce
Steps to reproduce the behaviour:
from guizero import App, Text, TextBox
app = App(layout="grid")
name_label = Text(app, text="Name", grid=[0,0], align="left")
name = TextBox(app, grid=[1,0])
surname_label = Text(app, text="Surname", grid=[0,1], align="left")
surname = TextBox(app, grid=[1,1])
dob_label = Text(app, text="Date of Birth", grid=[0,2], align="left")
dob = TextBox(app, grid=[1,2])
app.display()

  1. Change [0,1] to [0,5]
  2. Change [1,1] to [1,5]

Expected behaviour
surname_label Displayed on the fifth grid, not on the third grid;;;like excel

Screenshots
Due to some reasons, uploading screenshots failed;

System information:

  • OS: Windows
  • guizero version: 1.4.0

Additional context
Add any other context about the problem here.

lawsie commented

I agree @lawsie, this is working as intended. Cells are sized to fit what they contain, if they contain nothing the size of each cell will be zero.

bsimmo commented

Having used this for a while, this was also one of the, erm, fun tasks during FutureLearn/teach computing to get your head around. (I think they're now an another learning site, I've lost track)
I think it may also be in their book too.

Closing as wont fix.