\ddZddlmZmZmZmZmZmZddlm Z m Z m Z m Z dgZ GddeZdZedkr edSdS) 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. )FrameText ScrollbarPackGridPlace)RIGHTLEFTYBOTH ScrolledTextceZdZddZdZdS)r Nc `t||_t|j|_|jt t |d|jjitj ||jfi||ttd|j |jd<tt}tt tt"ztt$z}||}|D]>}|ddkr0|dkr*|d kr$t)||t+|j|?dS) N)sidefillyscrollcommandT)rrexpandcommandr_config configure)rframervbarpackr r updatesetr__init__r r yviewvarskeysrrr differencesetattrgetattr)selfmasterkw text_methsmethodsms %..\python\lib\tkinter\scrolledtext.pyrzScrolledText.__init__sX6]] dj))  E*** #TY]3444 dDJ--"--- t$t 444#z )$ZZ__&& t**//##d4jjoo&7&77$u++:J:J:L:LL$$Z00 9 9Ats{{qH}}k1A1AaQ!7!7888 9 9c*t|jSN)strr)r$s r*__str__zScrolledText.__str__)s4:r+r-)__name__ __module__ __qualname__rr/r+r*r r s79999(r+cddlm}tdd}||t|t td|| dS)Nr)ENDwhite )bgheightT)rrr) tkinter.constantsr5r insert__doc__rr r focus_setmainloop)r5stexts r*exampler@-sx%%%%%% GB / / /E LLg JJDtDJ111 OO NNr+__main__N)r<tkinterrrrrrrr:r r r r __all__r r@r0r3r+r*rDs  >===============222222222222  42 z GIIIIIr+