Closed rixchy closed 4 years ago
For what I've found grid aligning is somewhat tricky. They way i managed to workaround this is to add an empty placeholder so that appJar will actually create an extracolumn.
app.addEmptyLabel('Filler', 0,0)
I sincerely don't know if this is the intended behavior, you might want to wait for a response from the developer of the package. In more complex cases you also might need to use frames to actually get the alignment you want (I found that if you want two object on the same grid column to have different size/behavior, you might actually need to place one inside a frame).
Can you try adding the following line before you add the label:
app.setSticky("n")
This is supposed to make the widgets "stick" to the north of the grid-cell. Ref: http://appjar.info/pythonWidgetLayout/#widget-positioning
The behaviour you describe is the "expected" behaviour..
Have a read here
Basically, you have to tell the rows/columns to stretch appropriately, and tell the widgets to stick to the relevant sides.
So, calling app.setSticky('news')
will cause widgets to stick to all four sides (north, east, south, west). And calling app.setStretch('both')
will ensure the grid is stretching to fill the entire space.
Bug Report
I am having an issue, where my "emptyLabel" does NOT align like it should. I set it on row 0 and column 1, tho it's in the center.
Context
I am trying to create a calculator in appJar tho I am a beginner. If there is some pretty dumb errors I have made there, then I apologize in advance.
Expected Behaviour
I expect it to align it at the top.
Actual Behaviour
Aligns in center.
Any error messages produced by appJar
Nope, not any errors.
Sample code, demonstrating the issue
What steps are needed to reproduce the bug
I am new to GitHub too, so I don't exactly know what "bug reproducing" means, sorry.
Version Information
For some reason, it shows that "appJar" module isn't found...