本文整理汇总了Python中matplotlib.backends.backend_gtk3agg.FigureCanvasGTK3Agg.set_vexpand方法的典型用法代码示例。如果您正苦于以下问题:Python FigureCanvasGTK3Agg.set_vexpand方法的具体用法?Python FigureCanvasGTK3Agg.set_vexpand怎么用?Python FigureCanvasGTK3Agg.set_vexpand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类matplotlib.backends.backend_gtk3agg.FigureCanvasGTK3Agg
的用法示例。
在下文中一共展示了FigureCanvasGTK3Agg.set_vexpand方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: LockinGui
# 需要导入模块: from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg [as 别名]
# 或者: from matplotlib.backends.backend_gtk3agg.FigureCanvasGTK3Agg import set_vexpand [as 别名]
#.........这里部分代码省略.........
self.lockinonoff_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=3)
self.lockinonoff_box.set_homogeneous(True)
self.lockinonoff_box.add(self.label_lockinonoff)
self.lockinonoff_box.add(self.button_lockinonoff)
self.button_scan_start = Gtk.Button('Start Scan')
self.scan_hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=3)
self.button_scan_add = Gtk.ToolButton(Gtk.STOCK_ADD)
self.button_scan_remove = Gtk.ToolButton(Gtk.STOCK_REMOVE)
self.button_scan_clear = Gtk.ToolButton(Gtk.STOCK_DELETE)
self.scan_hbox.set_homogeneous(True)
self.scan_hbox.add(self.button_scan_add)
self.scan_hbox.add(self.button_scan_remove)
self.scan_hbox.add(self.button_scan_clear)
# Treeview for showing/settings scanning grid
self.scan_store = Gtk.ListStore(float, float)
self.scan_view = Gtk.TreeView(model=self.scan_store)
self.scan_xrenderer = Gtk.CellRendererText()
self.scan_xrenderer.set_property("editable", True)
self.scan_xcolumn = Gtk.TreeViewColumn("x", self.scan_xrenderer, text=0)
self.scan_xcolumn.set_min_width(100)
self.scan_xcolumn.set_alignment(0.5)
self.scan_view.append_column(self.scan_xcolumn)
self.scan_yrenderer = Gtk.CellRendererText()
self.scan_yrenderer.set_property("editable", True)
self.scan_ycolumn = Gtk.TreeViewColumn("y", self.scan_yrenderer, text=1)
self.scan_ycolumn.set_min_width(100)
self.scan_ycolumn.set_alignment(0.5)
self.scan_view.append_column(self.scan_ycolumn)
self.scan_scroller = Gtk.ScrolledWindow()
self.scan_scroller.set_vexpand(True)
self.scan_scroller.add(self.scan_view)
self.scan_store.append([10.0, 10.0])
self.scan_store.append([10.1, 10.0])
self.scan_store.append([10.0, 10.1])
#Connections for scanning stack
self.button_add_position.connect("clicked", self.on_add_position_clicked)
self.button_spangrid.connect("clicked", self.on_spangrid_clicked)
self.button_scan_start.connect("clicked", self.on_scan_start_clicked)
self.button_scan_add.connect("clicked", self.on_scan_add)
self.button_scan_remove.connect("clicked", self.on_scan_remove)
self.button_scan_clear.connect("clicked", self.on_scan_clear)
self.scan_xrenderer.connect("edited", self.on_scan_xedited)
self.scan_yrenderer.connect("edited", self.on_scan_yedited)
#Box for control of scanning
self.ScanningBox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=3)
self.ScanningBox.add(Gtk.Separator())
self.ScanningBox.add(self.button_add_position)
self.ScanningBox.add(self.button_spangrid)
self.ScanningBox.add(self.searchonoff_box)
self.ScanningBox.add(self.lockinonoff_box)
self.ScanningBox.add(Gtk.Separator())
self.ScanningBox.add(Gtk.Label("Scanning Positions"))
self.ScanningBox.add(self.scan_hbox)
self.ScanningBox.add(self.scan_scroller)
self.ScanningBox.add(Gtk.Separator())
self.ScanningBox.add(self.button_scan_start)