コード例 #1
0
ファイル: selectorWin.py プロジェクト: GiovanH/BEE2.4
                ('line', 'The dark constuction and office areas of Aperture.'
                         'Catwalks extend between different buildings, with'
                         'vactubes and cranes carrying objects throughout'
                         'the facility.'),
                ('rule', ''),
                ('line', 'Abandoned offices can often be found here.')
                ],
            ),
        ]

    window = selWin(
        TK_ROOT,
        test_list,
        has_none=True,
        has_def=True,
        callback=functools.partial(
            print,
            'Selected:',
        )
    )
    window.widget(TK_ROOT).grid(row=1, column=0, sticky='EW')
    window.set_suggested("SKY_BLACK")

    def swap_read():
        window.readonly = not window.readonly

    ttk.Button(TK_ROOT, text='Readonly', command=swap_read).grid()

    TK_ROOT.deiconify()
    TK_ROOT.mainloop()
コード例 #2
0
ファイル: selectorWin.py プロジェクト: Stendec-UA/BEE2.4
                         'vactubes and cranes carrying objects throughout '
                         'the facility.'),
                ('rule', ''),
                ('line', 'Abandoned offices can often be found here.'),
                ('bullet', 'This is a bullet point, with a\n second line'),
                ('invert', 'white-on-black text')
                ],
            ),
        ]

    window = selWin(
        TK_ROOT,
        test_list,
        has_none=True,
        has_def=True,
        callback=functools.partial(
            print,
            'Selected:',
        )
    )
    window.widget(TK_ROOT).grid(row=1, column=0, sticky='EW')
    window.set_suggested("SKY_BLACK")

    def swap_read():
        window.readonly = not window.readonly

    ttk.Button(TK_ROOT, text='Readonly', command=swap_read).grid()

    TK_ROOT.deiconify()
    TK_ROOT.mainloop()