当前位置: 首页>>代码示例>>Python>>正文


Python scrolledpanel.ScrolledPanel类代码示例

本文整理汇总了Python中wx.lib.scrolledpanel.ScrolledPanel的典型用法代码示例。如果您正苦于以下问题:Python ScrolledPanel类的具体用法?Python ScrolledPanel怎么用?Python ScrolledPanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ScrolledPanel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

	def __init__(self, parent, global_store, prog, *args, **kwargs):
		ScrolledPanel.__init__(self, parent, *args, **kwargs)

		self.global_store = global_store
		self.prog = prog

		self.values = prog.values
		self.resource_labels = prog.resource_labels
		self.resources = prog.resources

		self.last_variable = None
		self.cur_row, self.cur_col = 0, 0

		parameters = self.extract_parameters(prog)

		# Panel.
		self.parameter_sizer = wx.GridBagSizer(5)

		self.parameter_sizer.AddGrowableCol(self.input_col, 1)
		if self.use_resource_labels:
			self.parameter_sizer.AddGrowableCol(self.input_col + 1, 1)

		## Headings.
		self.add_headings()

		## Parameter inputs.
		for parameter in parameters:
			self.add_row(parameter)

		self.SetSizer(self.parameter_sizer)
		self.SetupScrolling()
开发者ID:jvosk,项目名称:SpanishAcquisitionPy3Compliant,代码行数:31,代码来源:pulse.py

示例2: __init__

    def __init__(self, parent, main):
        ScrolledPanel.__init__(self, parent)
        self.main = main
        self.control_to_key = {}
        self.immediate = True

        bbox = wx.BoxSizer(wx.HORIZONTAL)

        if not self.immediate:
            b_save = wx.Button(self, -1, "Save")
            b_reset = wx.Button(self, -1, "Reset")
            self.Bind(wx.EVT_BUTTON, self.OnSave, b_save)
            self.Bind(wx.EVT_BUTTON, self.OnReset, b_reset)
            bbox.Add(b_save, 1, wx.EXPAND)
            bbox.Add(b_reset, 1, wx.EXPAND)

        box = wx.BoxSizer(wx.VERTICAL)

        self.lc_grid = wx.FlexGridSizer(0, 2)
        self.lc_grid.AddGrowableCol(1)

        box.Add(self.lc_grid, 1, wx.EXPAND)
        box.Add(bbox, 0, wx.EXPAND)
        #box.Add(del_setup, 0, wx.EXPAND)

        self.SetSizer(box)
        self.Layout()

        self.update()
开发者ID:larroy,项目名称:clearskies-gui,代码行数:29,代码来源:config.py

示例3: __init__

    def __init__(self, parent, root):
        ScrolledPanel.__init__(self, parent = parent, id = wx.ID_ANY)

        self.model = parent.model # Create a reference to model.

        numberOfItems = len(root.items)
        get = OS_GET in root.capabilities
        set_ = OS_SET in root.capabilities
        info = OS_INFO in root.capabilities
        #print "Number of Item in '%s' panel: %u" % (root.name, len(root.items))

        self.controlMap = {}

        sizer = wx.GridBagSizer(2, 2 + numberOfItems)
        self.addLabels(sizer, "Get", "Set", "Info")
        for idx, item in enumerate(root.items, 2):
            st = wx.StaticText(self, label = item.name)
            sizer.Add(st, (idx, 0), wx.DefaultSpan, wx.ALL, 5)
            st.SetToolTip(wx.ToolTip(item.note))
            if get:
                newId = self.addCheckBox(sizer, idx, 1)
                self.controlMap[newId] = Control(OS_GET, item)
            if set_:
                newId = self.addCheckBox(sizer, idx, 2)
                self.controlMap[newId] = Control(OS_SET, item)
            if info:
                newId = self.addCheckBox(sizer, idx, 3)
                self.controlMap[newId] = Control(OS_INFO, item)

        self.SetSizerAndFit(sizer)
        self.SetupScrolling()
开发者ID:quanminhdo,项目名称:GENIBus-Arduino,代码行数:31,代码来源:GeniGen.py

示例4: __init__

 def __init__(self, parent, base=None, *args, **kwds):
     """
     """
     ScrolledPanel.__init__(self, parent, *args, **kwds)
     PanelBase.__init__(self)
     self.SetupScrolling()
     # Font size
     self.SetWindowVariant(variant=FONT_VARIANT)
     # Object that receive status event
     self.base = base
     self.parent = parent
     # chemeical formula, string
     self.compound = ""
     # value of the density/volume, float
     self.input = None
     # text controls
     self.compound_ctl = None
     self.input_ctl = None
     self.molar_mass_ctl = None
     self.output_ctl = None
     self.ctr_color = self.GetBackgroundColour()
     # button
     self.button_calculate = None
     # list
     self._input_list = _INPUTS
     self._input = self._input_list[1]
     self._output = self._input_list[0]
     self._unit_list = _UNITS
     # Draw the panel
     self._do_layout()
     self.SetAutoLayout(True)
     self.Layout()
开发者ID:diffpy,项目名称:srfit-sasview,代码行数:32,代码来源:density_panel.py

示例5: __init__

	def __init__(self, parent ):
		ScrolledPanel.__init__(self, parent, -1)
		sizer = wx.BoxSizer( wx.VERTICAL )
		self.SetupScrolling( False, True, 10, 10)
		self.SetSizer( sizer )
		self.Bind(wx.EVT_SIZE, self.LayoutVirtualSize)
		self.SetDoubleBuffered(True)
开发者ID:boisei0,项目名称:arcreator,代码行数:7,代码来源:ParameterPanel.py

示例6: __init__

    def __init__(self, parent):
        ScrolledPanel.__init__(self, parent = parent, id = wx.ID_ANY)

        sizer = self.addValues()
        self.btnSetRefValues = wx.Button(self, label = "Set Reference Values", id = controlids.ID_SET_REFERENCE_VALUES)

        static_box = wx.StaticBox(self, label = 'Control-Mode')
        groupSizer = wx.StaticBoxSizer(static_box, wx.HORIZONTAL)
        btnConstPressure = wx.ToggleButton(self, label = 'Constant Pressure', id = controlids.ID_CMD_CONST_PRESS)
        groupSizer.Add(btnConstPressure, 1, wx.ALL, 5)
        btnPropPressure = wx.ToggleButton(self, label = 'Proportional Pressure', id = controlids.ID_CMD_PROP_PRESS)
        groupSizer.Add(btnPropPressure, 1, wx.ALL, 5)
        btnConstFreq = wx.ToggleButton(self, label = 'Constant Frequency', id = controlids.ID_CMD_CONST_FREQ)
        groupSizer.Add(btnConstFreq, 1, wx.ALL, 5)
        btnAutomatic = wx.ToggleButton(self, label = 'Automatic', id = controlids.ID_CMD_AUTOMATIC)
        self.btnBgColor = btnAutomatic.GetBackgroundColour()
        groupSizer.Add(btnAutomatic, 1, wx.ALL, 5)
        self.setControlMode(CONTROL_MODE_AUTOMATIC)

        btnConstPressure.controlMode = CONTROL_MODE_CONSTANT_PRESSURE
        btnPropPressure.controlMode = CONTROL_MODE_PROPORTIONAL_PRESSURE
        btnConstFreq.controlMode = CONTROL_MODE_CONSTANT_FREQUENCY
        btnAutomatic.controlMode = CONTROL_MODE_AUTOMATIC

        self.Bind(wx.EVT_TOGGLEBUTTON, self.choiceButton, btnConstPressure)
        self.Bind(wx.EVT_TOGGLEBUTTON, self.choiceButton, btnPropPressure)
        self.Bind(wx.EVT_TOGGLEBUTTON, self.choiceButton, btnConstFreq)
        self.Bind(wx.EVT_TOGGLEBUTTON, self.choiceButton, btnAutomatic)

        sizer.Add(groupSizer, (len(DataitemConfiguration['ReferenceValues']), 0), (1, 3), wx.ALL | wx.GROW, 5)
        sizer.Add(self.btnSetRefValues, ((len(DataitemConfiguration['ReferenceValues']) + 1), 0), wx.DefaultSpan, wx.ALL | wx.ALIGN_RIGHT, 5)

        self.SetSizerAndFit(sizer)
	self.SetupScrolling()
开发者ID:brahimalaya,项目名称:GENIBus-Arduino,代码行数:34,代码来源:refpanel.py

示例7: __init__

    def __init__(self, parent, id, model, label=None, cache=True, **kw):

        # Base-class constructor.
        wxScrolledPanel.__init__(self, parent, id, **kw)
        self.SetupScrolling()

        # The switcher model that we are a panel for.
        self.model = model

        # Should we cache pages as we create them?
        self.cache = cache

        # The page cache (if caching was requested).
        self._page_cache = {}

        # The currently displayed page.
        self.current = None

        # Create the widget!
        self._create_widget(model, label)

        # Listen for when the selected item in the model is changed.
        model.on_trait_change(self._on_selected_changed, 'selected')

        return
开发者ID:bergtholdt,项目名称:pyface,代码行数:25,代码来源:switcher.py

示例8: __init__

    def __init__(self, parent, CellClass=None, CellBitmapClass=None,
                 rows=12, cols=2, cellheight=400, *args, **kwargs):
        ScrolledPanel.__init__(self, parent, *args, **kwargs)
        self.parent = parent

        self.num_rows = rows
        self.num_cols = cols

        self.cell_width = None    # set by display_page
        self.cell_height = cellheight

        self.imgpaths = []
        self.cur_page = 0

        self.CellClass = CellClass if CellClass != None else CellPanel

        # A 2-D array containing all CellPanels. self.cells[i][j]
        # is the CellPanel at row i, col j.
        self.cells = [[None for _ in range(self.num_cols)] for _ in range(self.num_rows)]
        self.gridsizer = wx.GridSizer(self.num_rows, self.num_cols)

        # A fn: (x1,y1,x2,y2)->(x1,y1,x2,y2)'
        self.transfn = None

        # Pre-populate the gridsizer with StaticBitmaps
        for i in range(self.num_rows):
            for j in range(self.num_cols):
                cellpanel = self.CellClass(self, i, j, CellBitmapClass=CellBitmapClass)
                self.cells[i][j] = cellpanel
                self.gridsizer.Add(cellpanel)
        self.sizer = wx.BoxSizer(wx.VERTICAL)

        self.sizer.Add(self.gridsizer)

        self.SetSizer(self.sizer)
开发者ID:darg0001,项目名称:evoting-systems,代码行数:35,代码来源:util_widgets.py

示例9: __init__

    def __init__(self, parent, *args, **kwds):
        kwds["style"] = wx.DEFAULT_DIALOG_STYLE

        ScrolledPanel.__init__(self, parent, **kwds)
        self.SetupScrolling()
        image = os.path.join(config._welcome_image)
        self.SetWindowVariant(variant=FONT_VARIANT)
        self.bitmap_logo = wx.StaticBitmap(self, -1, wx.Bitmap(image))

        self.label_copyright = wx.StaticText(self, -1, config._copyright)
        self.static_line_1 = wx.StaticLine(self, -1)
        self.label_acknowledgement = wx.StaticText(self, -1,
                                                   config._acknowledgement)

        self.hyperlink_license = wx.StaticText(self, -1,
                                               "Comments? Bugs? Requests?")
        send_ticket = "Send us a ticket at: "
        send_ticket += "[email protected]"
        self.hyperlink_paper = \
            wx.lib.hyperlink.HyperLinkCtrl(self, -1,
                                           send_ticket, URL=config._license)

        self.label_title = \
            wx.StaticText(self, -1,
                          config.__appname__ + " " + str(config.__version__))
        try:
            build_num = str(config.__build__)
        except:
            build_num = str(config.__version__)
        self.label_build = wx.StaticText(self, -1, "Build: " + build_num)

        sizer_main = wx.BoxSizer(wx.VERTICAL)
        sizer_header = wx.BoxSizer(wx.HORIZONTAL)
        sizer_build = wx.BoxSizer(wx.VERTICAL)

        sizer_header.Add(self.bitmap_logo, 0, wx.EXPAND | wx.LEFT, 5)

        sizer_build.Add(self.label_acknowledgement, 0,
                        wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
        sizer_build.Add((5, 5))
        sizer_build.Add(self.label_title, 0,
                        wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
        sizer_build.Add(self.label_build, 0,
                        wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
        sizer_build.Add(self.label_copyright, 0,
                        wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
        sizer_build.Add((5, 5))
        sizer_build.Add(self.hyperlink_license, 0,
                        wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)
        sizer_build.Add(self.hyperlink_paper, 0,
                        wx.LEFT | wx.EXPAND | wx.ADJUST_MINSIZE, 15)

        sizer_main.Add(sizer_header, 0, wx.TOP | wx.EXPAND, 3)
        sizer_main.Add(self.static_line_1, 0, wx.EXPAND, 0)
        sizer_main.Add(sizer_build, 0, wx.BOTTOM | wx.EXPAND, 3)

        self.SetAutoLayout(True)
        self.SetSizer(sizer_main)
        self.Fit()
开发者ID:lewisodriscoll,项目名称:sasview,代码行数:59,代码来源:welcome_panel.py

示例10: __init__

    def __init__(self, prnt, size=1, title='Default'):
	ScrolledPanel.__init__(self, prnt)
	self.sizer = wx.GridSizer(16,16)
	self.SetSizer(self.sizer)	
        	
	colorBox = wx.Button(self, id=-1)
	colorBox.Bind(wx.EVT_RIGHT_UP, self.OnRightUp, colorBox)
	self.sizer.Add(colorBox, 0, wx.ALL, 1)
开发者ID:beisserm,项目名称:tilem,代码行数:8,代码来源:paletteExample.py

示例11: __init__

    def __init__(self, parent, id=-1, plots=None, **kwargs):
        """
        """
        ScrolledPanel.__init__(self, parent, id=id, **kwargs)
        PanelBase.__init__(self, parent)
        self.SetupScrolling()
        #Set window's font size
        self.SetWindowVariant(variant=FONT_VARIANT)
        self._set_analysis(False)

        self.plots = plots
        self.radio_buttons = {}
        self.parent = parent.parent

        ## Data file TextCtrl
        self.data_file = None
        self.plot_data = None
        self.nfunc_ctl = None
        self.alpha_ctl = None
        self.dmax_ctl = None
        self.time_ctl = None
        self.chi2_ctl = None
        self.osc_ctl = None
        self.file_radio = None
        self.plot_radio = None
        self.label_sugg = None
        self.qmin_ctl = None
        self.qmax_ctl = None
        self.swidth_ctl = None
        self.sheight_ctl = None

        self.rg_ctl = None
        self.iq0_ctl = None
        self.bck_chk = None
        self.bck_ctl = None

        # TextCtrl for fraction of positive P(r)
        self.pos_ctl = None

        # TextCtrl for fraction of 1 sigma positive P(r)
        self.pos_err_ctl = None

        ## Estimates
        self.alpha_estimate_ctl = None
        self.nterms_estimate_ctl = None
        ## D_max distance explorator
        self.distance_explorator_ctl = None
        ## Data manager
        self._manager = None
        ## Default file location for save
        self._default_save_location = os.getcwd()
        if self.parent is not None:
            self._default_save_location = \
                        self.parent._default_save_location

        # Default width
        self._default_width = 350
        self._do_layout()
开发者ID:pkienzle,项目名称:sasview,代码行数:58,代码来源:inversion_panel.py

示例12: __init__

    def __init__(self, engine, config, parent):
        """Create a configuration component based on the given ConfigParser.

        Arguments:

        config -- A Config object.

        parent -- This component's parent component.

        """
        ScrolledPanel.__init__(self, parent)
        self.engine = engine
        self.config = config

        self.up_bitmap = wx.Bitmap(UP_IMAGE_FILE, wx.BITMAP_TYPE_PNG)
        self.down_bitmap = wx.Bitmap(DOWN_IMAGE_FILE, wx.BITMAP_TYPE_PNG)
        self.remove_bitmap = wx.Bitmap(REMOVE_IMAGE_FILE, wx.BITMAP_TYPE_PNG)

        main_sizer = wx.BoxSizer(wx.VERTICAL)

        button_sizer = wx.BoxSizer(wx.HORIZONTAL)

        button = wx.Button(self, wx.ID_ANY, EDIT_BUTTON_NAME)
        button_sizer.Add(button, border=UI_BORDER, flag=wx.ALL)
        button.Bind(wx.EVT_BUTTON, self.show_edit)

        button = wx.Button(self, wx.ID_ANY, ADD_TRANSLATION_BUTTON_NAME)
        button_sizer.Add(button, border=UI_BORDER, flag=wx.ALL)
        button.Bind(wx.EVT_BUTTON, self.show_add_translation)

        button = wx.Button(self, wx.ID_ANY, ADD_DICTIONARY_BUTTON_NAME)
        button_sizer.Add(button, border=UI_BORDER, flag=wx.ALL)
        button.Bind(wx.EVT_BUTTON, self.add_dictionary)

        button = wx.Button(self, wx.ID_ANY, LOOKUP_BUTTON_NAME)
        button_sizer.Add(button, border=UI_BORDER, flag=wx.ALL)
        button.Bind(wx.EVT_BUTTON, self.show_lookup)

        main_sizer.Add(button_sizer)

        self.dictionary_controls = []
        self.dicts_sizer = wx.BoxSizer(wx.VERTICAL)

        main_sizer.Add(self.dicts_sizer)

        self.mask = "Json files (*%s)|*%s|RTF/CRE files (*%s)|*%s" % (
            conf.JSON_EXTENSION,
            conf.JSON_EXTENSION,
            conf.RTF_EXTENSION,
            conf.RTF_EXTENSION,
        )

        self.SetSizerAndFit(main_sizer)
        self.SetupScrolling()

        # Fill in dictionaries *after* setting the minimum client size.
        for filename in config.get_dictionary_file_names():
            self.add_row(filename)
开发者ID:Cat-Ion,项目名称:plover,代码行数:58,代码来源:config.py

示例13: __init__

  def __init__(self, parent, widget):
    ScrolledPanel.__init__(self, parent)
    self.SetupScrolling(scroll_x=False)

    sizer = wx.BoxSizer(wx.VERTICAL)
    self.widget = widget

    sizer.Add(self.widget.build(self), 0, wx.EXPAND)
    self.SetSizer(sizer)
开发者ID:gcmcom,项目名称:pyFileFixity,代码行数:9,代码来源:componenets2_runner.py

示例14: __init__

    def __init__(self, place, **args):
        ScrolledPanel.__init__(self, place[0], -1)#, style=wx.SUNKEN_BORDER)
        Widget.__init__(self, place, **args)
        Container.__init__(self)

        self.layout = wx.BoxSizer(wx.VERTICAL)
        self.SetSizer(self.layout)
        self.SetAutoLayout(True)
        self.SetupScrolling()
开发者ID:BackupTheBerlios,项目名称:grafity-svn,代码行数:9,代码来源:containers.py

示例15: __init__

 def __init__(self, parent, *args, **kwargs):
     ScrolledPanel.__init__(self, parent, style=wx.SIMPLE_BORDER, *args, **kwargs)
     
     self.sizer = wx.BoxSizer(wx.HORIZONTAL)
     self.results = wx.StaticText(self, label="")
     self.sizer.Add(self.results, flag=wx.EXPAND)
     
     self.SetSizer(self.sizer)
     self.Fit()
开发者ID:darg0001,项目名称:evoting-systems,代码行数:9,代码来源:postprocess.py


注:本文中的wx.lib.scrolledpanel.ScrolledPanel类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。