Module albow.dialog.LookForFileDialog
Source code
import os
from albow.dialog.FileOpenDialog import FileOpenDialog
class LookForFileDialog(FileOpenDialog):
target = None
def __init__(self, target, **kwds):
super().__init__(**kwds)
self.target = target
def item_is_choosable(self, path):
return path and os.path.basename(path) == self.target
def filter(self, name):
return name and os.path.basename(name) == self.target
Classes
class LookForFileDialog (target, **kwds)-
The Dialog class provides a convenient container for implementing modal dialogs. Pressing Return or Enter dismisses the dialog with the value True, and pressing Escape dismisses it with the value False.
See the
albow.core.ui.Widgetdismiss()andpresent()methodsArgs
client- The widget the dialog is on top of
responses- A list of responses
default- The index to the default response; Default is the first
cancel- The index to the cancel response; Default is None
**kwds:
Source code
class LookForFileDialog(FileOpenDialog): target = None def __init__(self, target, **kwds): super().__init__(**kwds) self.target = target def item_is_choosable(self, path): return path and os.path.basename(path) == self.target def filter(self, name): return name and os.path.basename(name) == self.targetAncestors
Class variables
var target
Methods
def filter(self, name)-
Source code
def filter(self, name): return name and os.path.basename(name) == self.target def item_is_choosable(self, path)-
Source code
def item_is_choosable(self, path): return path and os.path.basename(path) == self.target
Inherited members
FileOpenDialog:addadd_anchoradd_centeredanchorattention_lostaugment_mouse_eventbg_colorbg_imageborder_colorborder_widthcall_handlercall_parent_handlercancel_responseclick_outside_responsedefer_drawingdismissdrawdraw_overenter_responsefg_colorfocusfocus_switchfontget_cursorget_focusget_margin_rectget_rootget_top_widgetget_visibleglobal_to_localhas_focusinheritedinvalidateis_gl_containerkey_downkey_uplocal_to_globalmarginmenu_barparentparent_resizedpresentrectrelative_moderemoveremove_anchorresizedscale_bgsel_colorset_parentset_size_for_texttab_stopup_button_textvisible