관리-도구
편집 파일: dynOptionMenuWidget.cpython-35.opt-2.pyc
���]� � @ sz d d l Z d d l m Z m Z m Z m Z Gd d � d e � Z d d � Z e d k rv d d l m Z e e � d S) � N)� OptionMenu�_setit� StringVar�Buttonc @ s+ e Z d Z d d � Z d d d � Z d S)� DynOptionMenuc O s� t j | � } d t | j � � k r. | d =t j | | | | | | � | j d | j d � � | | _ | j d � | _ d S)NZhighlightthickness�command) �copy�list�keysr �__init__�config�get�variabler )�selfZmasterr �value�values�kwargsZ kwargsCopy� r �8/opt/alt/python35/lib64/python3.5/dynOptionMenuWidget.pyr s zDynOptionMenu.__init__Nc C sk | d j d d � x: | D]2 } | d j d | d t | j | | j � � q W| rg | j j | � d S)NZmenur �endZlabelr )�deleteZadd_commandr r r �set)r Z valueListr �itemr r r �SetMenu s zDynOptionMenu.SetMenu)�__name__� __module__�__qualname__r r r r r r r s r c s� d d l m } | � } | j d � | j d | j � d | j � d f � | j � t | � } | j d � t | | d d d d � � � j � � f d d � } t | d d d | �} | j � d S)Nr )�ToplevelzTets dynamic option menuz 200x100+%d+%d�� � zOld option setZold1Zold2Zold3Zold4c s# � j d d d d g d d �d S)NZnew1Znew2Znew3Znew4r znew option set)r r )�dynr r �update2 s z _dyn_option_menu.<locals>.update�textzChange option setr )�tkinterr �titleZgeometryZwinfo_rootxZwinfo_rootyZ focus_setr r r �packr )�parentr �top�varr! Zbuttonr )r r �_dyn_option_menu$ s r) �__main__)�run)r r# r r r r r r) r Zidlelib.idle_test.htestr+ r r r r �<module> s "