GUIS exclusiveComboBoxΒΆ

# -*-Python-*-
# Created by bgrierson at 27 Feb 2017  08:35

# This tutorial example shows how to use a list of options to set a set of exclusive switches
# An example comes from TRANSP where you can only use one source of information for the plasma
# composition Zeff.  This ComboBox sets three values at the same time.

desc = ['MAGDIF Resistivity', '1D Zeff History', '2D Zeff Profile']
keys = ['NLZEFM', 'NLZFIN', 'NLZFI2']
vals = [[True, False, False], [False, True, False], [False, False, True]]
locs = ["scratch['{}']".format(k) for k in keys]
opts = SortedDict(list(zip(desc, vals)))
OMFITx.ComboBox(locs, opts, 'Zeff Option', default=vals[0])