Closed tnsolley closed 4 years ago
Tried replacing all calls of app.addScrolledTextArea()
with app._textMaker(title, "scroll", row, column, colspan=2, rowspan, sticky="news")
, no change to the GUI. The "sticky" parameter does not seem to have taken-effect.
From what I can tell looking at lines 8584~8669 of appjar.py
, this seems to be an intentional choice; the methods addScrolledTextArea()
and _textMaker()
do not actually act-upon an input parameter sticky
, even-if provided.
Interesting bug...
I've been able to reproduce the error, and it look like it's related to the labelFrame.
If you add the scrolled text area without a label frame, it stretches appropriately, but when it's a in a labelFrame, the frame doesn't stretch.
However, if you tell the labelFrame to stretch, it seems the problem is solved:
with app.tab("HW", bg="slategrey", sticky="news"):
with app.labelFrame("HW Feedback", sticky='news'):
app.label("foo4", "Feedback:", row=0, column=0, colspan=1, rowspan=1)
app.addScrolledTextArea("lb4", row=1, column=0, colspan=1, rowspan=1)
app.addHorizontalSeparator(row=31, column=0, colspan=1, rowspan=1)
app.separator(row=31, column=0, colspan=1, sticky='news')
app.buttons(["Run","Retest","Quit HW"], s3, row=32, column=0)
app.buttons(["To Results"], t4, row=33, column=0)
@jarvisteach I was able to get the same results by modifying the LabelFrame as well.
This has addressed my immediate issues; not sure if the issue should be closed though, or remain open as a bug?
Going to close this as 'not a bug'. The docs definitely state that LabelFrames have a w
stickiness. See here: http://appjar.info/pythonWidgetGrouping/#label-frame
Bug Report
Context
Messing with the file and testing the addition of a few bits, including the Scrolled Text Area (which I would like to use in a future app).
Expected Behaviour
Expected for the
app.addScrolledTextArea(colspan=___)
to be of width 'colspan'.Actual Behaviour
The Scrolled Text Area does not change horizontal width, even when inside of a LabelFrame that should scale (sticky='news').
Any error messages produced by appJar
N/A
Sample code, demonstrating the issue
`with app.tab("HW", bg="slategrey", sticky="news"): with app.labelFrame("HW Feedback"): app.label("foo4", "Feedback:", row=0, column=0, colspan=1, rowspan=1) app.addScrolledTextArea("lb4", row=1, column=0, colspan=1, rowspan=1)
app.addHorizontalSeparator(row=31, column=0, colspan=1, rowspan=1)
What steps are needed to reproduce the bug
Add above code as tab-object within the file, e.g. after
with app.tab("Properties"):
.Version Information
Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:22:17) [MSC v.1500 32 bit (Intel)] on win32 Windows 10 AppJar 0.9.3