本文整理汇总了Python中fabmetheus_utilities.hidden_scrollbar.HiddenScrollbar.config方法的典型用法代码示例。如果您正苦于以下问题:Python HiddenScrollbar.config方法的具体用法?Python HiddenScrollbar.config怎么用?Python HiddenScrollbar.config使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fabmetheus_utilities.hidden_scrollbar.HiddenScrollbar
的用法示例。
在下文中一共展示了HiddenScrollbar.config方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: addToDialog
# 需要导入模块: from fabmetheus_utilities.hidden_scrollbar import HiddenScrollbar [as 别名]
# 或者: from fabmetheus_utilities.hidden_scrollbar.HiddenScrollbar import config [as 别名]
def addToDialog( self, gridPosition ):
"Add this to the dialog."
#http://www.pythonware.com/library/tkinter/introduction/x5453-patterns.htm
self.root = gridPosition.master
gridPosition.increment()
scrollbar = HiddenScrollbar( gridPosition.master )
self.listbox = settings.Tkinter.Listbox( gridPosition.master, selectmode = settings.Tkinter.SINGLE, yscrollcommand = scrollbar.set )
self.listbox.bind( '<ButtonRelease-1>', self.buttonReleaseOne )
gridPosition.master.bind( '<FocusIn>', self.focusIn )
scrollbar.config( command = self.listbox.yview )
self.listbox.grid( row = gridPosition.row, column = 0, sticky = settings.Tkinter.N + settings.Tkinter.S )
scrollbar.grid( row = gridPosition.row, column = 1, sticky = settings.Tkinter.N + settings.Tkinter.S )
self.setStateToValue()
self.repository.saveListenerTable[ 'updateProfileSaveListeners' ] = updateProfileSaveListeners
示例2: activateMouseModeTool
# 需要导入模块: from fabmetheus_utilities.hidden_scrollbar import HiddenScrollbar [as 别名]
# 或者: from fabmetheus_utilities.hidden_scrollbar.HiddenScrollbar import config [as 别名]
#.........这里部分代码省略.........
to=getLengthMinusOneMinimumOne(self.skeinPanes),
)
self.layerEntry.bind("<Return>", self.layerEntryReturnPressed)
self.layerEntry.grid(row=gridPosition.row, column=gridPosition.column, sticky=settings.Tkinter.W)
def addLine(self, gridPosition):
"Add the line frame items."
self.lineDiveButton = self.getPhotoButtonGridIncrement(self.lineDive, "dive.ppm", gridPosition)
self.lineSoarButton = self.getPhotoButtonGridIncrement(self.lineSoar, "soar.ppm", gridPosition)
gridPosition.increment()
settings.Tkinter.Label(gridPosition.master, text="Line:").grid(
row=gridPosition.row, column=gridPosition.column, sticky=settings.Tkinter.W
)
gridPosition.increment()
self.lineEntry = settings.Tkinter.Spinbox(
gridPosition.master,
command=self.lineEntryReturnPressed,
from_=0,
increment=1,
to=getLengthMinusOneMinimumOne(self.getColoredLines()),
)
self.lineEntry.bind("<Return>", self.lineEntryReturnPressed)
self.lineEntry.grid(row=gridPosition.row, column=gridPosition.column, sticky=settings.Tkinter.W)
def addMouseInstantTool(self, fileName, gridPosition, mouseInstantTool):
"Add the mouse instant tool and derived photo button."
mouseInstantTool.getReset(self)
photoButton = self.getPhotoButtonGridIncrement(mouseInstantTool.click, fileName, gridPosition)
mouseInstantTool.mouseButton = photoButton
self.mouseInstantButtons.append(photoButton)
def addMouseToolsBind(self):
"Add the mouse tool and bind button one clicked, button one released and motion."
self.xScrollbar.config(command=self.relayXview)
self.yScrollbar.config(command=self.relayYview)
self.canvas["xscrollcommand"] = self.xScrollbar.set
self.canvas["yscrollcommand"] = self.yScrollbar.set
settings.CloseListener(self, self.destroyAllDialogWindows).listenToWidget(self.canvas)
self.canvasScreenCenter = 0.5 * complex(
float(self.canvasWidth) / float(self.screenSize.real),
float(self.canvasHeight) / float(self.screenSize.imag),
)
self.addPhotoImage("stop.ppm", self.gridPosition)
self.gridPosition.increment()
self.addLayer(getGridHorizontalFrame(self.gridPosition))
self.gridPosition.increment()
self.addLine(getGridHorizontalFrame(self.gridPosition))
self.gridPosition.increment()
self.addScale(getGridHorizontalFrame(self.gridPosition))
self.gridPosition = settings.GridVertical(self.gridPosition.columnStart + 1, self.gridPosition.row)
self.gridPosition.master = self.root
for name in self.repository.frameList.value:
entity = self.getEntityFromName(name)
if entity != None:
self.gridPosition.incrementGivenNumberOfColumns(3)
entity.addToDialog(getGridHorizontalFrame(self.gridPosition))
for menuRadio in self.repository.mouseMode.menuRadios:
menuRadio.mouseTool = menuRadio.getNewMouseToolFunction().getReset(self)
self.mouseTool = menuRadio.mouseTool
self.createMouseModeTool()
self.canvas.bind("<Button-1>", self.button1)
self.canvas.bind("<ButtonRelease-1>", self.buttonRelease1)
self.canvas.bind("<KeyPress-Down>", self.keyPressDown)
self.canvas.bind("<KeyPress-Left>", self.keyPressLeft)
self.canvas.bind("<KeyPress-Right>", self.keyPressRight)
self.canvas.bind("<KeyPress-Up>", self.keyPressUp)