So, it would be nice to be able to insert scrollbars into my program (with Tkinter). Right now I'm using labels to display all my long blocks of text, and people flip through pages to get throught it all.
I thought I'd try to add a scrollbar, but it doesn't seem to work with labels, and I have terrible luck getting canvases to work. Any ideas?
# just a way to display long text
import Tkinter as tk
"""creates a text display area with a vertical scrollbar"""
scrollbar = tk.Scrollbar(root)
text1 = tk.Text(root, yscrollcommand=scrollbar.set)
text1.pack(side='left', expand=0, fill='both')
root = tk.Tk()
str1 = """\
A very long story here ...
Okay, thanks. I'll give it a shot. The only problem I've found with text boxes so far is that they seem to be sized completely differently from other widgets -- I use the screen width/height to size appropriately for most things, but with texts I have to do a lot of guesswork, since they always come out much bigger.
public class GrossmontBank
//class variables (global - accessible throughout this class)
//scanner object to be used throughout
private static Scanner input = new Scanner(System.in);