ó {fc@s€dZddlZddlmZmZmZmZdefd„ƒYZd„Ze dkr|ddl m Z e eƒndS( sd OptionMenu widget modified to allow dynamic menu reconfiguration and setting of highlightthickness iÿÿÿÿN(t OptionMenut_setitt StringVartButtont DynOptionMenucBs#eZdZd„Zdd„ZRS(sF unlike OptionMenu, our kwargs can include highlightthickness cOstj|ƒ}d|jƒkr+|d=ntj||||||Ž|jd|jdƒƒ||_|jdƒ|_dS(Nthighlightthicknesstcommand(tcopytkeysRt__init__tconfigtgettvariableR(tselftmasterR tvaluetvaluestkwargst kwargsCopy((s3/usr/lib64/python2.7/idlelib/dynOptionMenuWidget.pyR s  c Csn|djddƒx:|D]2}|djd|dt|j||jƒƒqW|rj|jj|ƒndS(s² 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 tmenuitendtlabelRN(tdeletet add_commandRR Rtset(R t valueListRtitem((s3/usr/lib64/python2.7/idlelib/dynOptionMenuWidget.pytSetMenus  N(t__name__t __module__t__doc__R tNoneR(((s3/usr/lib64/python2.7/idlelib/dynOptionMenuWidget.pyRs csÎddlm}|ƒ}|jdƒ|jd|jƒd|jƒdfƒ|jƒt|ƒ}|jdƒt ||dd d d ƒ‰ˆj ƒ‡fd †}t |d dd|ƒ}|j ƒdS(Niÿÿÿÿ(tToplevelsTets dynamic option menus 200x100+%d+%diÈi–sOld option settold1told2told3told4cs#ˆjddddgddƒdS(Ntnew1tnew2tnew3tnew4Rsnew option set(R((tdyn(s3/usr/lib64/python2.7/idlelib/dynOptionMenuWidget.pytupdate2sttextsChange option setR( tTkinterR ttitletgeometryt winfo_rootxt winfo_rootyt focus_setRRRtpackR(tparentR ttoptvarR*tbutton((R)s3/usr/lib64/python2.7/idlelib/dynOptionMenuWidget.pyt_dyn_option_menu$s      t__main__(trun( RRR,RRRRRR7Rtidlelib.idle_test.htestR9(((s3/usr/lib64/python2.7/idlelib/dynOptionMenuWidget.pyts "