本文整理汇总了Python中efl.elementary.separator.Separator.horizontal_set方法的典型用法代码示例。如果您正苦于以下问题:Python Separator.horizontal_set方法的具体用法?Python Separator.horizontal_set怎么用?Python Separator.horizontal_set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类efl.elementary.separator.Separator
的用法示例。
在下文中一共展示了Separator.horizontal_set方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from efl.elementary.separator import Separator [as 别名]
# 或者: from efl.elementary.separator.Separator import horizontal_set [as 别名]
def __init__(self, parent_widget, defaultPath="", defaultPopulate=True, *args, **kwargs):
Box.__init__(self, parent_widget, *args, **kwargs)
self.cancelCallback = None
self.actionCallback = None
self.directoryChangeCallback = None
self.threadedFunction = ThreadedFunction()
self._timer = ecore.Timer(0.02, self.populateFile)
#Watch key presses for ctrl+l to select entry
parent_widget.elm_event_callback_add(self.eventsCb)
self.selectedFolder = None
self.showHidden = False
self.currentDirectory = None
self.focusedEntry = None
self.folderOnly = False
self.sortReverse = False
self.addingHidden = False
self.pendingFiles = deque()
self.currentSubFolders = []
self.currentFiles = []
#Mode should be "save" or "load"
self.mode = "save"
self.home = os.path.expanduser("~")
self.root = "/"
#Label+Entry for File Name
self.filenameBox = Box(self, size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_HORIZ)
self.filenameBox.horizontal = True
self.filenameBox.show()
fileLabel = Label(self, size_hint_weight=(0.15, EVAS_HINT_EXPAND),
size_hint_align=FILL_HORIZ)
fileLabel.text = "Filename:"
fileLabel.show()
self.fileEntry = Entry(self, size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_HORIZ)
self.fileEntry.single_line_set(True)
self.fileEntry.scrollable_set(True)
self.fileEntry.callback_changed_user_add(self.fileEntryChanged)
self.fileEntry.show()
self.filenameBox.pack_end(fileLabel)
self.filenameBox.pack_end(self.fileEntry)
sep = Separator(self, size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_HORIZ)
sep.horizontal_set(True)
sep.show()
#Label+Entry for File Path
self.filepathBox = Box(self, size_hint_weight=EXPAND_HORIZ,
size_hint_align=FILL_HORIZ)
self.filepathBox.horizontal = True
self.filepathBox.show()
fileLabel = Label(self, size_hint_weight=(0.15, EVAS_HINT_EXPAND),
size_hint_align=FILL_HORIZ)
fileLabel.text = "Current Folder:"
fileLabel.show()
self.filepathEntry = Entry(self, size_hint_weight=EXPAND_BOTH,
size_hint_align=FILL_HORIZ)
self.filepathEntry.single_line_set(True)
self.filepathEntry.scrollable_set(True)
self.filepathEntry.callback_changed_user_add(self.fileEntryChanged)
self.filepathEntry.callback_unfocused_add(self.filepathEditDone)
self.filepathEntry.callback_activated_add(self.filepathEditDone)
#Wish this worked. Doesn't seem to do anything
#self.filepathEntry.input_hint_set(ELM_INPUT_HINT_AUTO_COMPLETE)
if defaultPath and os.path.isdir(defaultPath):
startPath = defaultPath
else:
startPath = self.home
self.filepathEntry.show()
self.filepathBox.pack_end(fileLabel)
self.filepathBox.pack_end(self.filepathEntry)
self.autocompleteHover = Hoversel(self, hover_parent=self)
self.autocompleteHover.callback_selected_add(self.autocompleteSelected)
#self.autocompleteHover.show()
self.fileSelectorBox = Panes(self, content_left_size=0.3,
size_hint_weight=EXPAND_BOTH, size_hint_align=FILL_BOTH)
self.fileSelectorBox.show()
"""Bookmarks Box contains:
- Button - Up Arrow
- List - Home/Root/GTK bookmarks
- Box
-- Button - Add Bookmark
#.........这里部分代码省略.........