0

I've just started playing around with AppJar as a GUI for python a few days ago and I've encountered an issue which I can't seem to solve.

It's about the grid management in AppJar and kind of difficult to sum up in words. So let me show you:

I've tried several ratios and sticky value for the different Frames. and the solution that worked for me (but is slow and ugly as hell) is commented out at the bottom.

app = gui("Organizer", "900x600")
#app.enableEnter()

#Window settings#
app.setSticky("new")
app.setExpand("Both")

#Adding Widgets#
app.addLabel("title", "Organizing studies", row=0, column=0,rowspan=1,colspan=12)
app.setLabelFont("title", "Calibri")
app.addButton("Login", openSub, row=0,column=12,rowspan=1,colspan=2)


#Courses Panel
app.startLabelFrame("Courses",row=1,column=0,rowspan=14,colspan=10,sticky="news")
app.addTable("Courses",[["Course","Start","End","Open"]])
app.stopLabelFrame()

#Tasks Panel
app.startLabelFrame("Tasks",row=1,column=10,rowspan=14,colspan=4,sticky="news")
app.addTable("Tasks",[["Task","End","Open"]])
app.stopLabelFrame()

app.addButtons(["Add Course","Add Task"],[addCourse,addTask],row=6,column=4,colspan=5,rowspan=1)
#for i in range(2,18):
#    app.addEmptyLabel("{0}".format(i),row=i,colspan=0)

This is what it should be producing:
This is what it should be producing

vs.

This is what it's Producing:
This is what it's Producing

I'm happy about any explanation or help

Jason Aller
  • 3,541
  • 28
  • 38
  • 38

1 Answers1

0

You've got a couple of issues to deal with:

1) You've set the labelFrames to span 14 rows, but then placed the Add buttons in row 6, drawing them on top. They will need to be in at least row 15. Or just don't ask the labelFrames to span rows, it's not necessary...

2) You will need to change the expand/sticky settings for each row:

  • use app.setSticky("ne") & app.setExpand("none") at the beginning
  • use app.setSticky("news") & app.setExpand("both") before the labelFrames
  • use app.setSticky("ne") & app.setExpand("none") before the buttons
R.Jarvis
  • 273
  • 2
  • 8