ok

Mini Shell

Direktori : /proc/thread-self/root/opt/alt/python34/lib64/python3.4/idlelib/__pycache__/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python34/lib64/python3.4/idlelib/__pycache__/ToolTip.cpython-34.pyo

�
f fe�@s�ddlTGdd�d�ZGdd�de�ZGdd�de�Zdd	�Zed
kr~ddlmZee�ndS)
�)�*c@syeZdZdd�Zddd�Zddd�Zdd	�Zd
d�Zdd
�Zddd�Z	dd�Z
dS)�ToolTipBasecCs�||_d|_d|_d|_|_|jjd|j�|_|jjd|j�|_	|jjd|j�|_
dS)Nrz<Enter>z<Leave>z
<ButtonPress>)�button�	tipwindow�id�x�yZbind�enterZ_id1�leaveZ_id2Z_id3)�selfr�r�4/opt/alt/python34/lib64/python3.4/idlelib/ToolTip.py�__init__
s			zToolTipBase.__init__NcCs|j�dS)N)�schedule)r�eventrrr
r	szToolTipBase.entercCs|j�|j�dS)N)�
unschedule�hidetip)rrrrr
r
s
zToolTipBase.leavecCs)|j�|jjd|j�|_dS)Ni�)rr�after�showtipr)rrrr
rs
zToolTipBase.schedulecCs/|j}d|_|r+|jj|�ndS)N)rrZafter_cancel)rrrrr
rs		zToolTipBase.unschedulecCs�|jr
dS|jj�d}|jj�|jj�d}t|j�|_}|jd�|jd||f�|j�dS)N��z+%d+%d)	rrZwinfo_rootxZwinfo_rootyZwinfo_heightZToplevelZwm_overrideredirectZwm_geometry�showcontents)rrr�twrrr
r$s	 
zToolTipBase.showtipzYour text herecCs;t|jd|dtdddtdd�}|j�dS)N�textZjustify�
backgroundz#ffffe0ZreliefZborderwidthr)�LabelrZLEFTZSOLID�pack)rr�labelrrr
r2szToolTipBase.showcontentscCs)|j}d|_|r%|j�ndS)N)rZdestroy)rrrrr
r8s		zToolTipBase.hidetip)�__name__�
__module__�__qualname__rr	r
rrrrrrrrr
rs	rc@s(eZdZdd�Zdd�ZdS)�ToolTipcCstj||�||_dS)N)rrr)rrrrrr
r?szToolTip.__init__cCstj||j�dS)N)rrr)rrrr
rBszToolTip.showcontentsN)rrr rrrrrr
r!>sr!c@s(eZdZdd�Zdd�ZdS)�ListboxToolTipcCstj||�||_dS)N)rr�items)rrr#rrr
rFszListboxToolTip.__init__cCsGt|jdd�}|j�x!|jD]}|jt|�q)WdS)Nrz#ffffe0)ZListboxrrr#�insertZEND)rZlistbox�itemrrr
rIs
zListboxToolTip.showcontentsN)rrr rrrrrr
r"Esr"c	Cs�t�}|jd�ttttjd|j����\}}}}|jd||df�t|dd�}|j	�t
|dd�}t
|dd�}|j	�|j	�t|d	�t|d
ddd
g�|j
�dS)NzTest tooltipz[x+]z+%d+%d�rzPlace your mouse over buttonszButton 1zButton 2z!This is tooltip text for button1.zThis isz
multiple lineztooltip textzfor button2)ZTk�title�list�map�int�re�splitZgeometryrrZButtonr!r"Zmainloop)	�parent�root�widthZheightrrrZbutton1Zbutton2rrr
�_tooltipOs	
3




r0�__main__)�runN)Ztkinterrr!r"r0rZidlelib.idle_test.htestr2rrrr
�<module>s
6


Zerion Mini Shell 1.0