ó «‡Uc@sgdZddlZejdƒddlZdejfd„ƒYZd„ZedkrceƒndS(soSize Group GtkSizeGroup provides a mechanism for grouping a number of widgets together so they all request the same amount of space. This is typically useful when you want a column of widgets to have the same size, but you can't use a GtkTable widget. Note that size groups only affect the amount of space requested, not the size that the widgets finally receive. If you want the widgets in a GtkSizeGroup to actually be the same size, you need to pack them in such a way that they get the size they request and not more. For example, if you are packing your widgets into a table, you would not include the GTK_FILL flag.iÿÿÿÿNs2.0t SizeGroupDemocBs/eZdd„Zd„Zd„Zd„ZRS(c Csltjj|d|dtjtjfƒy|j|jƒƒWn$tk re|jdd„ƒnX|jdd„ƒ|j t ƒtj t dƒ}|j j |ttdƒ|jdƒtjtjƒ|_tjdƒ}|j |ttdƒtjd d t ƒ}|jdƒ|jdƒ|jd ƒ|j|ƒd}|j|dd|ƒ|j|dd|ƒtjdƒ}|j |t t dƒtjd d t ƒ}|jdƒ|jdƒ|jd ƒ|j|ƒd}d}|j|dd|ƒ|j|dd|ƒtjdƒ}|j |t t dƒ|jtƒ|jd|jƒ|jƒdS(Ns Size GroupsitdestroycWs tjƒS(N(tgtkt main_quit(tw((s'/usr/lib/pygtk27/2.0/demos/sizegroup.pytstresponsecSs |jƒS(N(R(tdtr((s'/usr/lib/pygtk27/2.0/demos/sizegroup.pyRsis Color optionsii tRedtGreentBluet _Foregroundit _Backgrounds Line optionstSolidtDashedtDottedtSquaretRoundtArrowt_Dashings _Line endss_Enable groupingttoggled(R R R (RRR(RRR(RtDialogt__init__t STOCK_CLOSEtRESPONSE_CLOSEt set_screent get_screentAttributeErrortconnectt set_resizabletFalsetVBoxtvboxt pack_starttTruetset_border_widtht SizeGrouptSIZE_GROUP_HORIZONTALt size_grouptFrametTabletset_row_spacingstset_col_spacingstaddt_SizeGroupDemo__add_rowt CheckButtont set_activeton_toggle_groupingtshow_all( tselftparentR!tframettablet color_optionst dash_optionst end_optionst check_button((s'/usr/lib/pygtk27/2.0/demos/sizegroup.pyRsN            cCs;tjƒ}x|D]}|j|ƒqW|jdƒ|S(Ni(Rtcombo_box_new_textt append_textR/(R2toptionst option_menutopt((s'/usr/lib/pygtk27/2.0/demos/sizegroup.pyt__create_option_menuKs    c Cs¸tj|ƒ}|jtƒ|jddƒ|j|dd||dtjtjBdddƒ |j|ƒ}|j |ƒ|j j |ƒ|j|dd||dddddƒ dS(Niii( RtLabeltset_use_underlineR#t set_alignmenttattachtEXPANDtFILLt"_SizeGroupDemo__create_option_menutset_mnemonic_widgetR't add_widget(R2R5trowt label_textR<tlabelR=((s'/usr/lib/pygtk27/2.0/demos/sizegroup.pyt __add_rowTs 3 cCs9|jƒr"|jjtjƒn|jjtjƒdS(N(t get_activeR'tset_modeRR&tSIZE_GROUP_NONE(R2R9((s'/usr/lib/pygtk27/2.0/demos/sizegroup.pyR0_s N(t__name__t __module__tNoneRRFR-R0(((s'/usr/lib/pygtk27/2.0/demos/sizegroup.pyRs 7 cCstƒtjƒdS(N(RRtmain(((s'/usr/lib/pygtk27/2.0/demos/sizegroup.pyRSist__main__(t__doc__tpygtktrequireRRRRSRP(((s'/usr/lib/pygtk27/2.0/demos/sizegroup.pyt s   V