AlkantarClanX12

Your IP : 18.117.154.134


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



���]e�@sddlTGdd�d�ZGdd�de�ZGdd�de�Zdd	�Zed
kr{ddlmZee�d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�y�bind�enterZ_id1�leaveZ_id2Z_id3)�selfr�r
�,/opt/alt/python35/lib64/python3.5/ToolTip.py�__init__
s			zToolTipBase.__init__NcCs|j�dS)N)�schedule)r�eventr
r
rr
szToolTipBase.entercCs|j�|j�dS)N)�
unschedule�hidetip)rrr
r
rrs
zToolTipBase.leavecCs)|j�|jjd|j�|_dS)Ni�)rr�after�showtipr)rr
r
rrs
zToolTipBase.schedulecCs,|j}d|_|r(|jj|�dS)N)rrZafter_cancel)rrr
r
rrs		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)rrr�twr
r
rr$s	 
zToolTipBase.showtipzYour text herecCs;t|jd|dtdddtdd�}|j�dS)N�textZjustify�
backgroundz#ffffe0ZreliefZborderwidthr)�LabelrZLEFTZSOLID�pack)rr�labelr
r
rr2szToolTipBase.showcontentscCs&|j}d|_|r"|j�dS)N)rZdestroy)rrr
r
rr8s		zToolTipBase.hidetip)�__name__�
__module__�__qualname__rr
rrrrrrr
r
r
rrs	rc@s(eZdZdd�Zdd�ZdS)�ToolTipcCstj||�||_dS)N)rrr)rrrr
r
rr?szToolTip.__init__cCstj||j�dS)N)rrr)rr
r
rrBszToolTip.showcontentsN)rr r!rrr
r
r
rr">sr"c@s(eZdZdd�Zdd�ZdS)�ListboxToolTipcCstj||�||_dS)N)rr�items)rrr$r
r
rrFszListboxToolTip.__init__cCsGt|jdd�}|j�x!|jD]}|jt|�q)WdS)Nrz#ffffe0)ZListboxrrr$�insertZEND)rZlistbox�itemr
r
rrIs
zListboxToolTip.showcontentsN)rr r!rrr
r
r
rr#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




r1�__main__)�runN)�tkinterrr"r#r1rZidlelib.idle_test.htestr3r
r
r
r�<module>s
6