ok

Mini Shell

Direktori : /usr/lib64/python2.7/Demo/tix/
Upload File :
Current File : //usr/lib64/python2.7/Demo/tix/tixwidgets.pyc

�
V
�Qc
@s�ddlZddlZddlZddlZddlTddlZddlZdQZdRZdSZ	dTZ
dUZdZd	dVd
��YZ
d�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zddddgad�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd �Z d!�Z!d"�Z"d#�Z#d$�Z$d%�Z%d&�Z&d'�Z'd(�Z(d)�Z)d*�Z*d+�Z+d,�Z,d-�Z-id.d/6d0d16Z.id2d26d3d46d5d66d7d86d9d:6d;d<6d=d=6d>d?6d@dA6dBdC6dDdE6dFdG6dHdI6dJdK6Z/iZ0d2d4d6d=d:d<d?dAdEdCdGdIdKg
e0d/<d8ge0d1<dL�Z1dM�Z2dN�Z3dO�Z4e5dPkr�ej6�a7et7�ndS(Wi����N(t*iiiiiitDemocBsPeZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	RS(cCsT||_d|_d|_d|_tj�|_|jjd�d|_	d|_
d|_d|_t
jd}tjj|�}|r'|tjkr'||_d}xHttt
j��D]1}t
j|}|dtjfkr�|}q�q�W|dkr|t
j|<q6t
jjd|�ntj�|_t
jjd|jd�dS(Ni����t0tis/samples(troottexittNonetdirtballoontTixt	StringVartuseBalloonstsett	statusbartwelmsgtwelfonttwelsizetsystargvtostpathtdirnametcurdirtrangetlentinserttgetcwd(tselfttoptprognameRtindextitp((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyt__init__s0								
	

c	Cs|j}tj|dddt�}tj|dddddd�}tj|dd	dddd�}|jd
t�|jd
t�tj|dd�}||d<tj|dd�}||d<|j	d
dddd|d��|j
d
ddddtd|j�|S(NtbditreliefttexttFilet	underlineit	takefocustHelptsidettearofftmenutlabeltExititcommandcSs
|j�S(N(tquitcmd(R((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyt<lambda>FstBalloonHelptvariable(
RR	tFrametRAISEDt
MenubuttontpacktLEFTtRIGHTtMenutadd_commandtadd_checkbuttont
ToggleHelpR(RRtwtfilethelptfmthm((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyt
MkMainMenu9s	!!



c
Cs,|j}tj|dddddd�}|d|d<|jddd	d
dd|dd
��|jdddd
dd|dd��|jdddd
dd|dd��|jdddd
dd|dd��|jdddd
dd|dd��|jdddd
dd|dd��|S(NtipadxitipadytoptionssC
        tagPadX 6
        tagPadY 4
        borderWidth 2
        tbgtwelR,tWelcomeR&it	createcmdcSs
t||�S(N(t	MkWelcome(R=tname((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0ZstchotChooserscSs
t||�S(N(t
MkChoosers(R=RK((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0\stscrsScrolled WidgetscSs
t||�S(N(tMkScroll(R=RK((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0^stmgrsManager WidgetscSs
t||�S(N(t	MkManager(R=RK((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0`sRsDirectory ListcSs
t||�S(N(t	MkDirList(R=RK((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0bstexpsRun Sample ProgramscSs
t||�S(N(tMkSample(R=RK((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0ds(RR	tNoteBooktadd(RRR=((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pytMkMainNotebookOs"		c	Csq|j}tj|dtjdd�}tj|dtjdd�t_tjjddddddd	d
�|S(NR#R"itpadxitpadytleftitrights%70(	RR	R3R4tLabeltSUNKENtdemoR
tform(RRR=((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pytMkMainStatusgs
	!%cCs|j}|j�}|jd�|j�dkrD|jd�n
|jd�tj|�t_|j	�}|j
�}|j�}|jdt
dt�|jdtdt�|jdt
dddtd	d
dd
�tjtjd<|jd
|d��dS(NsTix Widget Demonstrationi s
790x590+10+10s
890x640+10+10R)tfilltexpandiRYiRZR
tWM_DELETE_WINDOWcSs
|j�S(N(R/(R((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0�s(Rtwinfo_topleveltwm_titletwinfo_screenwidthtgeometryR	tBalloonR_RRBRXRaR6tTOPtXtBOTTOMtBOTHR
twm_protocol(RRtztframe1tframe2tframe3((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pytbuildps	

(cCs
d|_dS(s@Quit our mainloop. It is up to you to call root.destroy() after.iN(R(R((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR/�scCsx|jdkry-x&|jdkr=|jjjt�qWWqtk
r\d|_dStk
r�tjdd�dkrd|_dSqqt	j
�\}}}d}x+tj|||�D]}||d7}q�Wytj
d	|�WnnXd|_td�qXqWdS(
s�This is an explict replacement for _tkinter mainloop()
        It lets you catch keyboard interrupts easier, and avoids
        the 20 msec. dead sleep() which burns a constant CPU.iiNt	InterruptsReally Quit?tyesRs
tError(RRttkt
dooneeventtTCL_ALL_EVENTSt
SystemExittKeyboardInterruptttkMessageBoxtaskquestionRtexc_infot	tracebacktformat_exceptiont	showerror(RtttvttbR$tline((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pytloop�s.
	
		cCs|jj�dS(N(Rtdestroy(R((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR��s(
t__name__t
__module__R!RBRXRaRsR/R�R�(((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRs								"cCs.t|�atj�tj�tj�dS(N(RR_RsR�R�(R((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pytRunMain�s

c	Csi|j|�}t|�}t|�}|jdtdtdddd�|jdtdtdd�dS(NR)RbRYiRZRci(tpagetMkWelcomeBart
MkWelcomeTextR6RjRkRm(tnbRKR=tbarR$((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRJ�s
"cCs�tj|dddtj�}tj|d|d��}tj|d|d��}d|jd<d	|jjd
<d|jd<d	|jjd
<|t_|t_	|j
tjd�|j
tjd
�|j
tjd�|j
tjd�|j
tjd�|j
tjd�|j
tjd�|j
tjd�|j
tjd�|jd�|jd	�|j
dtjdddd�|j
dtjdddd�tjj|dddd�tjj|dddd�|S(NR"iR#R.cSs
t|�S(N(tMainTextFont(R=((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0�scSs
t|�S(N(R�(R=((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0�sitwidthitheightitCouriert	HelveticatLucidasTimes Romant8t10t12t14t18iR)RYRZtmsgs
Choose
a fontt	statusmsgsChoose a font for this pages
Point sizes"Choose the font size for this page(R	R3tGROOVEtComboBoxtentrytslistboxtlistboxR_RRRtENDtpickR6R7Rtbind_widget(RR=tb1tb2((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR��s6

		

c
Cs�tj|dd�}|j}d}tj|dddddtjd	|�}tj|dddd
dtjd	d�}|jdd
dtjdddd�|jdd
dtjdddd�|t_	|S(Nt	scrollbartautosWelcome to TIX in PythonR"iR�itanchorR$i�s%Tix is a set of mega-widgets based on TK. This program demonstrates the widgets in the Tix widget set. You can choose the pages in this window to look at the corresponding widgets. 

To quit this program, choose the "File | Exit" command.

For more information, see http://tix.sourceforge.net.RciRbRYi
RZ(
R	tScrolledWindowtwindowR]tNtMessageR6RmR_R(RR=twinR$ttitleR�((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR��s		%%	cCs]tjs
dStjd}tjd}|dkr<d}nd||f}|tjd<dS(NtvaluesTimes Romanttimess%s %stfont(R_RRR(R=R�tpointtfontstr((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR��s	

	cCs6tjj�dkr%dtjd<n
dtjd<dS(Nt1tbothtstatetnone(R_RtgetR(((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR<sc	Csw|j|�}d}tj|ddd|�}tj|ddd|�}tj|ddd|�}tj|ddd|�}tj|ddd|�}tj|dd	d|�}	tj|dd
d|�}
tj|ddd|�}t|j�t|j�t|j�t|j�t|j�t	|	j�t
|
j�t|j�|jdd
dd
dd�|jdd
ddt
|�d|�|jdd
ddt
|�d|dd�|jd|dd
dd�|jd|ddt
|�d|�|	jd|ddt
|�d|�|jd|ddt
|�d|	dd�|
jdddd
dd�dS(Nslabel.padX 4R,sChooser WidgetsREttixComboBoxt
tixControlt	tixSelectt
tixOptionMenuttixFileEntryttixFileSelectBoxsTool BarRiR[R\s%33t&tbottomi����s%66(R�R	t
LabelFrametMkTitletframetMkCombot	MkControltMkSelectt	MkOptMenut	MkFileEntt	MkFileBoxt	MkToolBarR`tstr(R�RKR=REttiltcbxtctltseltopttfiltfbxttbr((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRNs4







&,&&,cCseddtjdf}tj|ddddd|�}tj|dd	dd
d|�}tj|dddd
dd
d
tjd|�}|jtjd�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd�|jtjd �|jtjd!�|jd"tjd#d$d%d&�|jd"tjd#d$d%d&�|jd"tjd#d$d%d&�dS('Ns-label.width %d label.anchor %s entry.width %di
iR,tStaticteditableiREtEditableitHistorythistoryR�tJanuarytFebruarytMarchtApriltMaytJunetJulytAugustt	SeptembertOctobertNovembertDecembertAngolat
BangladeshtChinatDenmarktEcuadors/usr/bin/kshs/usr/local/lib/pythons/var/admR)RYiRZi(R	tER�RR�R6Rj(R=REtstaticR�R�((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR�0s8!!tBengaltDelhit	Karnatakas
Tamil NaducCshtjtj��|}|dkr8tt�d}n|tt�krSd}ntjt|�dS(Nii(tstatesRtdemo_spintxtR�RR(R=tinctidx((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pytspin_cmdTs	cCs:ytjtj��}Wntk
r1tdSXt|S(Ni(R�RR�R�t
ValueError(R=R((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyt
spin_validate^s

	cCs�ddtjdf}tj�atjtd�tj|ddd|�}tj|ddd	td|�}|d
�|d<|d�|d
<|d�|d<|jdtjdddd�|jdtjdddd�dS(Ns-label.width %d label.anchor %s entry.width %di
i
iR,tNumbersREtStatesR2cSs
t|d�S(Ni(R�(R=((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0rstincrcmdcSs
t|d�S(Ni����(R�(R=((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0sstdecrcmdcSs
t|�S(N(R�(R=((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0tstvalidatecmdR)RYiRZi(	R	R�R
R�RR�tControlR6Rj(R=REtsimpletspintxt((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR�hs	cCs�dtj}tj|dddddddtjdtjd	|�}tj|dd
dddddtjdtjd	|�}|jdd
d�|jdd
d�|jdd
d�|jdd
d�|jdd
d�|jdd
d�|jdd
d�|jdd
d�|jdd
d�|jdd
d�|jdtjddddd tj�|jdtjddddd tj�dS(!Nslabel.anchor %sR,sMere Mortalst	allowzeroitradiotorientationt	labelsideREtGeeksiteatR$tEattworktWorktplaytPlaytpartytPartytsleeptSleeptprog1tProgramtprog2tprog3R)RYiRZiRb(	R	tCENTERtSelecttVERTICALRjRWR6R7Rk(R=REtsel1tsel2((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR�ys*
						(cCs�dtj}tj|ddd|�}|jddd�|jddd�|jd	dd
�|jddd�|jd
�|jddd�|jddd�|jdtjdddd�dS(Ns#menubutton.width 15 label.anchor %sR,sFile Format : RER$s
Plain Texttpostt
PostScripttformatsFormatted TextthtmltHTMLtsepttextLaTeXtrtfsRich Text FormatRbRYiRZi(R	R�t
OptionMenuR:R6Rk(R=REtm((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR��s

cCs�tj|dtjdddtjdd�}tj|dd�}|jd	tjd
ddtjd
ddd�|jd	tjdtjd
ddd�dS(NR#R�i�R�R$sGPress the "open file" icon button and a TixFileSelectDialog will popup.R,sSelect a file : R)RciRbRYiRZ(	R	R�tFLATR�t	FileEntryR6RjRmRk(R=R�tent((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR��s	.cCs�tj|dtjdddtjdd�}tj|�}|jdtjdd	d
tjddd
d�|jdtjd
tjddd
d�dS(s�The FileSelectBox is a Motif-style box with various enhancements.
    For example, you can adjust the size of the two listboxes
    and your past selections are recorded.
    R#R�i�R�R$s�The Tix FileSelectBox is a Motif-style box with various enhancements. For example, you can adjust the size of the two listboxes and your past selections are recorded.R)RciRbRYiRZN(	R	R�R"R�t
FileSelectBoxR6RjRmRk(R=R�tbox((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR��s	.cCs;d}tj|dtjdddtjdd�}tj|dd	dtj�}tj|d
ddd
ddd|�}tj|d
d
ddddd|�}|jdddtj	d�|jdddtj	d�|jdddtj	d�|jdddtj	d�|jdddtj	d�|jdddtj	d�|jdddtj	d �|jd!ddtj	d"�|j
d#tjd$dd%tjd&d'd(d'�|j
d#tjd%tj
d&d'd(d'�|j
i|d)6d#tjd&d'd(d'�|j
i|d)6d#tjd&d'd(d'�d*S(+sHThe Select widget is also good for arranging buttons in a tool bar.
    sframe.borderWidth 1R#R�i�R�R$sCThe Select widget is also good for arranging buttons in a tool bar.R"iR�iRiR,RREtboldtbitmapt@s/bitmaps/bold.xbmtitalics/bitmaps/italic.xbmR&s/bitmaps/underline.xbmtcapitals/bitmaps/capital.xbmR[s/bitmaps/leftj.xbmR\s/bitmaps/rightj.xbmtcenters/bitmaps/centerj.xbmtjustifys/bitmaps/justify.xbmR)RcRbRYiRZtinN(R	R�R"R�R3R4RRWR_RR6RjRmRkR7(R=RER�R�R�tpara((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR��s&	''.()cCs_tj|dtjdddtjdd�}|jdtjdd	d
tjddd
d�dS(NR#R�i�R�R$seThere are many types of "chooser" widgets that allow the user to input different types of informationR)RciRbRYiRZ(R	R�R"R�R6RjRm(R=R�((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR��s	c	Cs�|j|�}d}tj|ddd|�}tj|ddd|�}tj|ddd|�}t|j�t|j�t|j�|jddd	dd
ddd
�|jddd	|d
ddd
�|jddd	|d
d
dd
�dS(Nslabel.padX 4R,sTix.ScrolledListBoxREsTix.ScrolledWindowsTix.ScrolledTextRiR[R\s%33R�i����s%66(R�R	R�tMkSListR�t	MkSWindowtMkSTextR`(R�RKR=REtslstswntstx((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRP�s


""cCstj|dddd�}tj|�}tj|dtjdddtjdd	�}tj|d
d�}|jdd
dddddd�|jjtj	d�|jjtj	d�|jjtj	d�|jjtj	d�|jjtj	d�|jjtj	d�|jjtj	d�tj
|dddtjdddddd
d d!�}tj|dd"d#||d$��}|j
d%�|jd&tj�|jdtj�|jd'dd&tj�|jd&tj�|jd(d)d%||d*��d+S(,s�This TixScrolledListBox is configured so that it uses scrollbars
    only when it is necessary. Use the handles to resize the listbox and
    watch the scrollbars automatically appear and disappear.  R�i,R�iJR#i�R�R$s�This TixScrolledListBox is configured so that it uses scrollbars only when it is necessary. Use the handles to resize the listbox and watch the scrollbars automatically appear and disappear.R�R�txi2tyi�ixiPtAlabamat
CaliforniatMontanas
New JerseysNew YorktPennsylvaniat
WashingtonRFtblackt
handlesizeitgriddeditminwidtht	minheightitResetR.cSs
t||�S(N(tSList_reset(R=R6((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0siRbRcs<Map>tfunccSs%|jjdt|�dt|��S(Nt
tixDoWhenIdletattachwidget(RwtcallR�(targtrhtlist((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0sN(R	R3R�R"R�tScrolledListBoxtplaceR�RR�tResizeHandleR4tButtont	propagateR6RkRRmtbind(R=RtbotR�RJRItbtn((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0�s0	"	$
c	Cs=|jdddddddd�|j�|j|�dS(	NR6i2R7i�R�ixR�iP(RLtupdatet
attach_widget(RIRJ((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRC
s"
cCs�d}tjjtjdd�}tjj|�s@|d7}ntj|dddd�}tj|�}tj|dtj	dd	d
tj
d|�}tj|dd
�}|jj
dd|�}tj|jd|�}|jdddtj�|jdddddddd�tj|dddtjdddddd d!d�}	tj|dd"d#|	|d$��}
|jd%�|jdtj�|
jd
tj�|jdddtj�|jdtj�|jd&d'd%|	|d(��d)S(*s�The ScrolledWindow widget allows you to scroll any kind of Tk
    widget. It is more versatile than a scrolled canvas widget.
    s}The Tix ScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.tbitmapsstix.gifs (Image missing)R�iJR�R#i�R�R$R�R�tphotoR>timageRciRbR6iR7i�i�ixRFR=R>iR?R@i2RARBR.cSs
t||�S(N(t
SWindow_reset(R=R6((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0,sis<Map>RDcSs%|jjdt|�dt|��S(NRERF(RwRGR�(RHRIR�((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR03sN(RRtjoinR_RtisfileR	R3R�R"R�R�R�timage_createR]R6RmRLRMR4RNRORkRRP(R=R$R>RRQR�R�timage1tlblRIRR((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR1s0
	"	$
c	Cs=|jdddddddd�|j�|j|�dS(	NR6iR7i�R�i�R�ix(RLRSRT(RIR�((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRX6s"
cCs�tj|dddd�}tj|�}tj|dtjdddtjdd�}tj|d	d
�}d|jd<|jjtjd
�|j	dddddddd�tj
|dddtjdddddddd�}tj|ddd||d��}|j
d �|jd!tj�|jdtj�|jd"dd!tj�|jd!tj�|jd#d$d ||d%��d&S('s�The TixScrolledWindow widget allows you to scroll any kind of Tk
    widget. It is more versatile than a scrolled canvas widget.R�iJR�R#i�R�R$s}The Tix ScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.R�R�R�twraps�When -scrollbar is set to "auto", the
scrollbars are shown only when needed.
Additional modifiers can be used to force a
scrollbar to be shown or hidden. For example,
"auto -y" means the horizontal scrollbar
should be shown when needed but the vertical
scrollbar should always be hidden;
"auto +x" means the vertical scrollbar
should be shown when needed but the horizontal
scrollbar should always be shown, and so on.R6iR7i�i�idRFR=R>iR?iR@i2RARBR.cSs
t||�S(N(tSText_reset(R=R6((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0VsiRbRcs<Map>RDcSs%|jjdt|�dt|��S(NRERF(RwRGR�(RHRIR�((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0\sN(R	R3R�R"R�tScrolledTextR$RR�RLRMR4RNROR6RkRRmRP(R=RRQR�R�RIRR((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR2;s(	
	"	$
c	Cs=|jdddddddd�|j�|j|�dS(	NR6iR7i�R�i�R�ix(RLRSRT(RIR�((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR__s"
c	Cs�|j|�}d}tj|ddd|�}tj|ddd|�}t|j�t|j�|jddddd	|d
d�|jddd	dd
d�dS(Nslabel.padX 4R,sTix.PanedWindowREsTix.NoteBookRiR[R\R�i����(R�R	R�t
MkPanedWindowR�t
MkNoteBookR`(R�RKR=REtpanetnote((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRRds

"cCs[tj|dtjdddtjdd�}tj|ddd	d
�}|jjdd�tj|d
d�}|jddddd�}|jddd�}tj	|�}tj
|�}|jjtjd�|jjtjd�|jjtjd�|jjtjd�|jjtjd�|jjtjd�|jjtjd�|jd|j
d<d|j
d<|j
jtjd�|jdd d!tjd"d#d$d%�|jdd d!tjd"d#d$d%�|jd&tjd"d'd$d'd!tj�|jd&tjd"d'd$d'd!tj�|jd&tjd"d'd$d'd!tjdd �d(S()s�The PanedWindow widget allows the user to interactively manipulate
    the sizes of several panes. The panes can be arranged either vertically
    or horizontally.
    R#R�i�R�R$s�The PanedWindow widget allows the user to interactively manipulate the sizes of several panes. The panes can be arranged either vertically or horizontally.R,s
Newsgroup:REsentry.width 25iscomp.lang.pythonRtverticalRJtminiFtsizeids+  12324 Re: Tkinter is good for your healths++ 12325 Re: Tkinter is good for your healthsH+ 12326 Re: Tix is even better for your health (Was: Tkinter is good...)sH  12327 Re: Tix is even better for your health (Was: Tkinter is good...)sH+ 12328 Re: Tix is even better for your health (Was: Tkinter is good...)sH  12329 Re: Tix is even better for your health (Was: Tkinter is good...)sH+ 12330 Re: Tix is even better for your health (Was: Tkinter is good...)RFR�R^sO
Mon, 19 Jun 1995 11:39:52        comp.lang.python              Thread   34 of  220
Lines 353       A new way to put text and bitmaps together iNo responses
ioi@blue.seas.upenn.edu                Ioi K. Lam at University of Pennsylvania

Hi,

I have implemented a new image type called "compound". It allows you
to glue together a bunch of bitmaps, images and text strings together
to form a bigger image. Then you can use this image with widgets that
support the -image option. For example, you can display a text string
together with a bitmap, at the same time, inside a TK button widget.
RciRbRYiRZiR)iN(R	R�R"R�t
LabelEntryR�RtPanedWindowRWRKR`R�R�R$R6RmRj(R=R�tgroupRctp1tp2RJR$((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRaqs4	
%%((c	Cs�tj|dtjdddtjdd�}ddd	tjf}tj|d
dddd
|�}|jddddd�|jddddd�tj|j�}|j	dtj
dddddtj�t|�tj
|jdddd�}tj
|jdddd�}tj
|jdddd�}tj
|jdd dd!�}|j	dtjdd"dd�|j	dtjdd"dd�|j	dtjdd"dd�|j	dtjdd"dd�tj|j�}|j	dtj
dddddtj�t|�tj
|jdddd�}tj
|jdddd�}tj
|jdddd�}tj
|jdd dd!�}tj
|jdddd#�}|j	dtjdd"dd�|j	dtjdd"dd�|j	dtjdd"dd�|j	dtjdd"dd�|j	dtjdd"dd�|j	dtjdd$dd$dtj�|j	dtjdd%dd%dtjd&d'�dS((NR#R�i�R�R$sSThe NoteBook widget allows you to layout a complex interface into individual pages.s-entry.width %d label.width %d label.anchor %si
iRCiRDREt	hard_diskR,s	Hard DiskR&itnetworktNetworkR)RYiRZRbR�is
Access Time: i�sWrite Throughput: sRead Throughput: i�s
Capacity: isUsers: iiRci(R	R�R"R�R�RVRWR3RmR6R8tYtCreateCommonButtonsR�RjRnRm(	R=R�RER�tcommontatrtctu((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRb�sB	!(
(
(cCsxtj|dddd�}tj|dddd�}|jdtjddd	d�|jdtjddd	d�dS(
NR$tOKR�itCancelR)RYiRZ(R	RNR6Rj(tftoktcancel((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRq�sc	Cs�|j|�}d}tj|ddd|�}tj|ddd|�}t|j�t|j�|jddddd	d
dd�|jdddd
d	ddd�dS(
Nslabel.padX 4R,sTix.DirListREsTix.ExFileSelectBoxRiR[R\s%40R�i����(R�R	R�tMkDirListWidgetR�tMkExFileWidgetR`(R�RKR=RERtfsbox((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRS�s

"cCs�tj|dtjdddtjdd�}tj|dd�}|jd	tjd
ddtjd
ddd�|jd	tjd
ddd�dS(s�The TixDirList widget gives a graphical representation of the file
    system directory and makes it easy for the user to choose and access
    directories.
    R#R�i�R�R$s�The Tix DirList widget gives a graphical representation of the file system directory and makes it easy for the user to choose and access directories.REs+hlist.padY 1 hlist.width 25 hlist.height 16R)RciRbRYiRZN(R	R�R"R�tDirListR6RjRm(R=R�tdirlist((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR|�s	.cCs�tj|dtjdddtjdd�}tj|dddtj�}|jd	tjd
ddtjd
ddd�|jd	tjd
ddd�dS(s]The TixExFileSelectBox widget is more user friendly than the Motif
    style FileSelectBox.  R#R�i�R�R$sXThe Tix ExFileSelectBox widget is more user friendly than the Motif style FileSelectBox.R"iR)RciRbRYiRZN(	R	R�R"R�tExFileSelectBoxR4R6RjRm(R=R�R&((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR}�s	.sWidget DemostwidgetsImage DemosRWRitBtnBoxs
Button BoxR�s	Combo BoxtCmpImgsCompound ImageRsDirectory ListtDirTreesDirectory TreeR�RVtNotebooktOptMenusOption MenutPanedWinsPaned WindowtPopMenus
Popup MenutSHList1sScrolledHList (1)tSHList2sScrolledHList (2)tTreesTree (dynamic)cCsv|j|�}d}tj|dd�}|jdtjdddtj�|jddd	�}|jd
dd�}d|d
<d|d
<tj|dd�}|jdtjdddtjdddd�tj|dd�}|jdtjdddtjdddd�tj|j	dd�}	|	jdtjdddtjdd�tj
|j	dd�}
tjj
d�}|
jjd|�tj|j	dd�}tj|d
ddd�}
tj|d
ddd�}|
jdtjdddtj�|jdtjdddtj�|	jd |
jd <d!|
jd"<d#|
jd$<d%|
jd&<|jdtjdddtjdd'�|
jdtjdddtjdd'�d(|	jd)<d*|	jd&<d|	jd+<d,|	jd-<d|	jd.<d||	|
|
|d/�|	jd0<d||	|
|
|d1�|	jd2<d||	|
|
|d3�|
d0<d||	|
|
|d4�|d0<x�d5d6gD]�}|d5kr�tj|	jd7d8d9d8d&d:d
tjd |	jd �}|	jjd;tjd<|d"d!�n|	jjd;tjd"d!d
t|�}x7t|D]+}|	jj|d;tjd=|d
|�qWqzW|	jj�d!|
d"<d!|d"<dS(>Nslabel.padX 4Rt
horizontalR)RciRbRJR�R$t5tflatR#R,sSelect a sample program:RYiRZsSource:REshlist.width 20RKtstextstix option get fixed_fontR�R�sRun ...trunsView Source ...tviewiRFtdisabledR�R�R^iPR�it.t	separatorit
drawbranchi
tindentt
wideselectcSst|||||d�S(NR�(t
Sample_Action(targsR=tslbR�R�R�((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0�sR.cSst|||||d�S(Ntbrowse(R�(R�R=R�R�R�R�((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0�st	browsecmdcSst|||||d�S(NR�(R�(R�R=R�R�R�R�((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0�scSst|||||d�S(NR�(R�(R�R=R�R�R�R�((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0�sR�RWR"iR�i�titemtypeR�tdata(R�R	RiR6RjRmRWR�R�R�R`RRwtevalR$tconfigR3RNR7tNONEthlistRlRkR^t	add_childtWINDOWtTEXTtcommentststypestselection_clear(R�RKR=RERctf1tf2tlabtlab1R�R�R�R�R�R�ttypeR6tkey((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRUksd"

..(""


((




""!%


cBs@|j}|j�}|s2d|d<d|d<n|j|�sEdSd|d<d|d<|j|�}|}	e|}
|dkr�d|
dUej�}|j|	�e|
d�}||�nv|dkrej�}|jd|	�e	|t
jd	|
d
�n.|dkr<e|j
t
jd	|
d
�ndS(NR�R�tnormalR�simport s
.RunSampleR�s
Source view: s	/samples/s.pyR�(R�tinfo_anchortinfo_parentt	info_datatsamplesR	tToplevelR�R�tLoadFileR_RtReadFileR$(R=R�R�R�R�tactionR�R�R�R�tprogtrtn((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR��s0	






cCs�tj|ddd|j�}tj|�}|j�|j�tjjd�}|jj	d|�d|jd<d|jd	<t
|j|�dS(
NR$tCloseR.stix option get fixed_fontR�iR"R�R^(R	RNR�R`R6RRwR�R$R�R�(R=tfnametbR�R�((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR��s



cCs�|d}d|d<|jdtj�zJt|�}|j�}x!|D]}|jtj|�qIW|j�Wd||d<XdS(NR�R�s0.0(tdeleteR	R�topent	readlinesRtclose(R=R�t	old_stateRytlinests((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR��s


t__main__iiiii ((8Rtos.pathRR	tTkconstantsRR|t
TCL_DONT_WAITtTCL_WINDOW_EVENTStTCL_FILE_EVENTStTCL_TIMER_EVENTStTCL_IDLE_EVENTSRyRR�RJR�R�R�R<RNR�R�R�R�R�R�R�R�R�R�R�RPR0RCR1RXR2R_RRRaRbRqRSR|R}R�R�R�RUR�R�R�R�tTkR(((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyt<module>s�0
�	
		%				%	"	
	
									 		'		$		
	/	.				


^
	@			

Zerion Mini Shell 1.0