U e5d@sldZdgZddlmZmZmZmZmZmZddl m Z m Z m Z m Z GdddeZddZedkrhed S) aA ScrolledText widget feels like a text widget but also has a vertical scroll bar on its right. (Later, options may be added to add a horizontal bar as well, to make the bars disappear automatically when not needed, to move them to the other side of the window, etc.) Configuration options are passed to the Text widget. A Frame widget is inserted between the master and the text, to hold the Scrollbar widget. Most methods calls are inherited from the Text widget; Pack, Grid and Place methods are redirected to the Frame widget however. ScrolledText)FrameText ScrollbarPackGridPlace)RIGHTLEFTYBOTHc@seZdZdddZddZdS)rNcKst||_t|j|_|jjttd|d|jjit j ||jf||jt t dd|j |jd<tt }ttttBttB}||}|D]4}|ddkr|dkr|d krt||t|j|qdS) N)sidefillZyscrollcommandT)r rexpandZcommandr_ZconfigZ configure)rframerZvbarpackr r updatesetr__init__r r Zyviewvarskeysrrr differencesetattrgetattr)selfZmasterkwZ text_methsmethodsmr,/usr/lib64/python3.8/tkinter/scrolledtext.pyrs    $ zScrolledText.__init__cCs t|jS)N)strr)rrrr __str__)szScrolledText.__str__)N)__name__ __module__ __qualname__rr"rrrr rs cCsHddlm}tddd}||t|jttdd|| dS)Nr)ENDZwhite )ZbgZheightT)rr r) tkinter.constantsr&rinsert__doc__rr r Z focus_setZmainloop)r&Zstextrrr example-s    r+__main__N)r*__all__Ztkinterrrrrrrr(r r r r rr+r#rrrr s