Files
DesktopAssistant/__pycache__/tkscrolledframe.cpython-37.pyc

82 lines
6.6 KiB
Plaintext
Raw Normal View History

2021-10-08 18:28:43 +02:00
B
<00>p`aN(<00>@sVdZddlZddlZyddlmZWnek
r8YnXdgZGdd<03>dej<08>Z dS)z.Implementation of the scrollable frame widget.<2E>N<> ScrolledFramec@s<>eZdZdZddd<04>Zdd<06>Zdd<08>Zd d
<EFBFBD>Zd d <0C>ZeZ d d d<0E>Z
e
Z d!dd<11>Z dd<13>Z dd<15>Zd"dd<17>Zdd<19>Zdd<1B>ZdZdZdZdS)#ra<>Scrollable Frame widget.
Use display_widget() to set the interior widget. For example,
to display a Label with the text "Hello, world!", you can say:
sf = ScrolledFrame(self)
sf.pack()
sf.display_widget(Label, text="Hello, world!")
The constructor accepts the usual Tkinter keyword arguments, plus
a handful of its own:
scrollbars (str; default: "both")
Which scrollbars to provide.
Must be one of "vertical", "horizontal," "both", or "neither".
use_ttk (bool; default: False)
Whether to use ttk widgets if available.
The default is to use standard Tk widgets. This setting has
no effect if ttk is not available on your system.
NcKs<>tj<01>||<01>d|_d|_d|_d|krV|d}|d=|sB|j}q\||jkr\td<04><01>n|j}d|kr<>t rx|drxt j
}ntj
}|d=ntj
}d|kr<>d|d<d|kr<>d |d<|j d
dd <0B>|j d
dd <0B>tj |d
d
d
d <0C>}|_|<00>|<05>|<00>|<05>|<05>d |j<12>||d|jd<0F>}|_||d|jd<0F>}|_|j|j|jd<11>|jd
d
dd<13>|dk<02>sd|dk<02>rt|jd
ddd<13>|dk<02>s<>|dk<02>r<>|jdd
dd<13>|j|_|j|_|j|_|j|_|j|_|j|_|j|_|jf|<02>dS)z%Return a new scrollable frame widget.NF<4E>
scrollbarszRscrollbars parameter must be one of 'vertical', 'horizontal', 'both', or 'neither'Zuse_ttk<74> borderwidth<74><00>relief<65>sunkenr)Zweight)r<00>highlightthickness<73> takefocusz <Configure><3E>
horizontal)Zorient<6E>command<6E>vertical)ZxscrollcommandZyscrollcommand<6E>nsew)<03>row<6F>columnZsticky<6B>both<74>nsZwe)<1E>tk<74>Frame<6D>__init__<5F> _interior<6F> _interior_id<69>
_fit_width<EFBFBD>_DEFAULT_SCROLLBARS<52>_VALID_SCROLLBARS<52>
ValueError<EFBFBD>ttk<74> Scrollbar<61>grid_columnconfigure<72>grid_rowconfigure<72>Canvas<61>_canvas<61>bind_arrow_keys<79>bind_scroll_wheel<65>bind<6E>_resize_interior<6F>xviewZ _x_scrollbar<61>yviewZ _y_scrollbar<61> configure<72>set<65>grid<69> focus_set<65>unbind<6E> xview_moveto<74> yview_moveto)<08>self<6C>master<65>kwr<00> scrollbar<61>cZxsZys<79>r3<00>Bc:\Users\24das\Documents\GitHub\DesktopAssitant\tkscrolledframe.pyr)sf

 

zScrolledFrame.__init__cCs6||jkr|jjf||i<01>ntjj|f||i<01>dS)z Configure resources of a widget.N)<05> _CANVAS_KEYSr r'rr)r.<00>key<65>valuer3r3r4<00> __setitem__<5F>s
zScrolledFrame.__setitem__csT|<01>d<01>fdd<03><08>|<01>d<04>fdd<03><08>|<01>d<06>fdd<03><08>|<01>d<08>fd d<03><08>d
S) z;Bind the specified widget's arrow key events to the canvas.z<Up>cs<00>j<00>dd<02>S)N<><4E><EFBFBD><EFBFBD><EFBFBD><EFBFBD>units)r <00> yview_scroll)<01>event)r.r3r4<00><lambda><3E>sz/ScrolledFrame.bind_arrow_keys.<locals>.<lambda>z<Down>cs<00>j<00>dd<02>S)Nrr:)r r;)r<)r.r3r4r=<00>sz<Left>cs<00>j<00>dd<02>S)Nr9r:)r <00> xview_scroll)r<)r.r3r4r=<00>sz<Right>cs<00>j<00>dd<02>S)Nrr:)r r>)r<)r.r3r4r=<00>sN)r#)r.<00>widgetr3)r.r4r!<00>szScrolledFrame.bind_arrow_keyscCs.|<01>d|j<01>|<01>d|j<01>|<01>d|j<01>dS)z=Bind the specified widget's mouse scroll event to the canvas.z <MouseWheel>z
<Button-4>z
<Button-5>N)r#<00>_scroll_canvas)r.r?r3r3r4r"<00>szScrolledFrame.bind_scroll_wheelcCs(||jkr|j<01>|<01>Stj<04>||<01>SdS)z4Return the resource value for a KEY given as string.N)r5r <00>cgetrr)r.r6r3r3r4rA<00>s
 zScrolledFrame.cgetcKs<|rx|D]}||||<q
Wx|D]}||||<q$WdS)z Configure resources of a widget.Nr3)r.<00>cnfr0r6r3r3r4r'<00>s


zScrolledFrame.configureFcKs\|<00><00>||_||jf|<03>|_|jjddd|jd<03>|_|j<03>d|j<07>|<00><08>|<00> <09>|jS)aCreate and display a new widget.
If fit_width == True, the interior widget will be stretched as
needed to fit the width of the frame.
Keyword arguments are passed to the widget_class constructor.
Returns the new widget.
r<00>nw)<02>anchor<6F>windowz <Configure>)
<EFBFBD>eraserr r<00> create_windowrr#<00>_update_scroll_regionr$<00> scroll_to_top)r.Z widget_classZ fit_widthr0r3r3r4<00>display_widget<65>s 
 zScrolledFrame.display_widgetcCs*|j<00>d<01>|`|`d|_d|_d|_dS)zErase the displayed widget.<2E>allNF)r <00>deleterrr)r.r3r3r4rF<00>s  zScrolledFrame.erasecCs|j<00>d<01>|j<00>d<01>dS)z,Scroll to the top-left corner of the canvas.rN)r r,r-)r.r3r3r4rI<00>s zScrolledFrame.scroll_to_topcCsH|jrD|jrD|j<02><03>}|j<04><05>}||krDt||<03>}|jj|j|d<01>dS)z-Resize the interior widget to fit the canvas.)<01>widthN)rrr <00> winfo_widthr<00>winfo_reqwidth<74>max<61> itemconfigure)r.r<Z canvas_widthZrequested_widthZ new_widthr3r3r4r$<00>s  


zScrolledFrame._resize_interiorcCsp|j}tj<02>d<01>r&|<02>d|jd<03>nF|jdkr>|<02>dd<03>n.|jdkrV|<02>dd<03>n|<02>d|jdd<03>dS) zScroll the canvas.<2E>darwinr9r:<00><00>r<00>xN)r <00>sys<79>platform<72>
startswithr;<00>delta<74>num)r.r<r2r3r3r4r@ s 

zScrolledFrame._scroll_canvascCs.|j<00><01>}|j<00><02>}|jjdd||fd<02>dS)z=Update the scroll region when the interior widget is resized.r)Z scrollregionN)rrO<00>winfo_reqheightr r')r.r<Z req_widthZ
req_heightr3r3r4rH"s

z#ScrolledFrame._update_scroll_region)rM<00>heightr r)r r
rZneither)N)N)F)N)<15>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__doc__rr8r!r"rA<00> __getitem__r'<00>configrJrFrIr$r@rHr5rrr3r3r3r4rs$
W 


'
 )
r`rV<00>tkinterrZ tkinter.ttkr<00> ImportError<6F>__all__rrr3r3r3r4<00><module>s