Hacked By AnonymousFox

Current Path : /proc/thread-self/root/proc/self/root/opt/alt/python35/lib64/python3.5/idlelib/__pycache__/
Upload File :
Current File : //proc/thread-self/root/proc/self/root/opt/alt/python35/lib64/python3.5/idlelib/__pycache__/dynOptionMenuWidget.cpython-35.pyc



��Yf��@s�dZddlZddlmZmZmZmZGdd�de�Zdd�Ze	dkr|dd	l
mZee�dS)
zd
OptionMenu widget modified to allow dynamic menu reconfiguration
and setting of highlightthickness
�N)�
OptionMenu�_setit�	StringVar�Buttonc@s1eZdZdZdd�Zddd�ZdS)�
DynOptionMenuzF
    unlike OptionMenu, our kwargs can include highlightthickness
    cOs�tj|�}dt|j��kr.|d=tj||||||�|jd|jd��||_|jd�|_dS)NZhighlightthickness�command)	�copy�list�keysr�__init__�config�get�variabler)�selfZmasterr�value�values�kwargsZ
kwargsCopy�r�@/opt/alt/python35/lib64/python3.5/idlelib/dynOptionMenuWidget.pyrs	zDynOptionMenu.__init__Nc	Csk|djdd�x:|D]2}|djd|dt|j||j��qW|rg|jj|�dS)z�
        clear and reload the menu with a new set of options.
        valueList - list of new options
        value - initial value to set the optionmenu's menubutton to
        Zmenur�endZlabelrN)ZdeleteZadd_commandrrr�set)rZ	valueListr�itemrrr�SetMenus
zDynOptionMenu.SetMenu)�__name__�
__module__�__qualname__�__doc__rrrrrrrsrcs�ddlm}|�}|jd�|jd|j�d|j�df�|j�t|�}|jd�t	||dd	d
d���j
��fdd
�}t|ddd|�}|j
�dS)Nr)�ToplevelzTets dynamic option menuz
200x100+%d+%d���zOld option setZold1Zold2Zold3Zold4cs#�jddddgdd�dS)NZnew1Znew2Znew3Znew4rznew option set)rr)�dynrr�update2sz _dyn_option_menu.<locals>.update�textzChange option setr)�tkinterr�titleZgeometryZwinfo_rootxZwinfo_rootyZ	focus_setrrrZpackr)�parentr�top�varr!Zbuttonr)r r�_dyn_option_menu$s	



r(�__main__)�run)rrr#rrrrrr(rZidlelib.idle_test.htestr*rrrr�<module>s"

Hacked By AnonymousFox1.0, Coded By AnonymousFox