本文整理匯總了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
#.........這裏部分代碼省略.........