def __init__(self, style = 'nonmodal_dialog', closable = 0, zoomable = 0, resizable = 0, **kwds): if 'title' not in kwds: kwds['title'] = Globals.application_name Window.__init__(self, style = style, closable = closable, zoomable = zoomable, resizable = resizable, **kwds)
def __init__(self, **kwds): Window.__init__(self, **kwds) self.view = TestScrollableView(container=self, x=20, y=20, width=300, height=300) #, scrolling = 'hv') self.view.report_update_rect = True if 1: ### self.h_scrolling_ctrl = CheckBox("Horizontal Scrolling", value='h' in self.view.scrolling, action='horz_scrolling') self.v_scrolling_ctrl = CheckBox("Vertical Scrolling", value='v' in self.view.scrolling, action='vert_scrolling') self.border_ctrl = CheckBox("Border", value=1, action='change_border') CheckBox("Vertical Scrolling", value=1, action='vert_scrolling'), buttons = self.create_buttons() x = self.view.right + 5 y = self.view.top for b in buttons: b.position = (x, y) self.add(b) y = b.bottom + 5 #self.shrink_wrap() self.view.become_target()
def __init__( self ): Window.__init__( self, title='File/channel selection', resizable=False ) self.selection_frames = [] self.last_selected_directory = DirRef('.') self.enter_button = Button(title='Plot',action=self.plot,width=200) self.add_frame()
def __init__(self): columns = [Column(*t) for t in [ ("Day", lambda t: t.date.day), ("i?", invoiceableSymbol), ("p?", paymentSymbol), ("Amount", lambda t: float(t.amount)), ("Memo", lambda t: str(t.memo)), ]] self.transactions_tbl = Table(columns=columns, scrolling='hv', multi_select=True) columns = [ Column("Month", lambda (y, m): date(y, m, 1).strftime("%Y %b")), ] rows = D.withSession(Q.allTransactionMonths) self.months_tbl = Table(rows=rows, columns=columns, scrolling='v', selection_changed_action=self.month_changed) Window.__init__(self, title="Statements", size=(1000, 500)) self.place(self.months_tbl, left=0, right=100, top=0, bottom=0, sticky='nsw') self.place(self.transactions_tbl, left=self.months_tbl, right=0, top=0, bottom=0, sticky='nesw') self.menus = [ Menu("Statements", [ ("Select likely invoiceables/L", "select_likely_invoiceables"), ("Mark selection as invoiceable/I", "mark_selection_as_invoiceable"), ("Mark selection as payment/P", "mark_selection_as_payment"), ]), ]
def __init__(self, **kwds): Window.__init__(self, **kwds) view = TestScrollableView(container = self, size = (300, 300), extent = (1000, 1000), scrolling = 'hv', anchor = 'ltrb') button = Button("Embedded", action = self.click) off = (300, 300) view.scroll_offset = off button.position = off view.add(button) self.shrink_wrap()
def __init__(self, **kwds): Window.__init__(self, **kwds) view = TestScrollableView(container=self, size=(300, 300), extent=(1000, 1000), scrolling='hv', anchor='ltrb') button = Button("Embedded", action=self.click) off = (300, 300) view.scroll_offset = off button.position = off view.add(button) self.shrink_wrap()
def __init__(self, span, spanView): Window.__init__(self, style='modal_dialog') self.title = "Edit utterance data" self.span = span self.spanView = spanView # controls utterance_label = Label("Utterance ID") speaker_label = Label("Speaker code") self.place(utterance_label, left=20, top=20) self.place(speaker_label, left=20, top=utterance_label + 20) # self.place(Button("Confirm", action = "ok", enabled = True), left =20, top = speaker_label+20) # self.place(Button("Cancel", action = "cancel", enabled = True), right =20, top = speaker_label+20) # self.shrink_wrap(padding=(20, 20))
def __init__(self): Window.__init__(self, size = (200, 200)) self.filt = CheckBox("%ss only" % self.file_type.name) #self.multi = CheckBox("Multiple Selection") buts = [] if 'request_old_file' in functions: buts.append(Button("Old File", action = self.do_old_file)) if 'request_old_files' in functions: buts.append(Button("Old Files", action = self.do_old_files)) if 'request_new_file' in functions: buts.append(Button("New File", action = self.do_new_file)) if 'request_old_directory' in functions: buts.append(Button("Old Directory", action = self.do_old_dir)) if 'request_old_directories' in functions: buts.append(Button("Old Directories", action = self.do_old_dirs)) if 'request_new_directory' in functions: buts.append(Button("New Directory", action = self.do_new_dir)) self.place_column([self.filt] + buts, left = 20, top = 20) self.shrink_wrap(padding = (20, 20))
def __init__(self, **kwds): Window.__init__(self, **kwds) self.view = TestScrollableView(container = self, x = 20, y = 20, width = 300, height = 300)#, scrolling = 'hv') self.view.report_update_rect = True if 1: ### self.h_scrolling_ctrl = CheckBox("Horizontal Scrolling", value = 'h' in self.view.scrolling, action = 'horz_scrolling') self.v_scrolling_ctrl = CheckBox("Vertical Scrolling", value = 'v' in self.view.scrolling, action = 'vert_scrolling') self.border_ctrl = CheckBox("Border", value = 1, action = 'change_border') CheckBox("Vertical Scrolling", value = 1, action = 'vert_scrolling'), buttons = self.create_buttons() x = self.view.right + 5 y = self.view.top for b in buttons: b.position = (x, y) self.add(b) y = b.bottom + 5 #self.shrink_wrap() self.view.become_target()
def __init__( self, controller, logo_file, **kwds ): """This method is the constructor for the class.""" #self._win_has_menubar = False #call the parent constructor Window.__init__( self, size = ( 600, 400 ) ) #set the title self.set_title( "Obscure Reference" ) #center ourselves self.center( ) #save the controller self._controller = controller #the navigation frame will take up the left quarter of the screen self._nav_width = self.width / 4 #the main frame will take up the right remainder of the screen self._main_width = self.width - self._nav_width #create the bold font self._bold_font = Font( style = ["bold"] ) self._Create_Navigation_Frame( ) #create the main frame self._main_frame = \ Frame( width = self._main_width, height = self.height )#- number_constants.menu_bar_height ) #create the initial sub frame self._sub_frame = \ Frame( width = (self._main_width - number_constants.basic_pad), height = self.height ) self._logo_image = Image( logo_file ) #self._intro_canvas = Canvas( None ) #self._intro_canvas = View( ) #self._intro_canvas = Frame( width = 500, height = 300 ) #put the column on the GUI self._sub_frame.place_column( \ [Label("Welcome to the Obscure Reference League", just = "center", width = (self._main_width - number_constants.basic_pad), font = self._bold_font ), #self._intro_canvas], Label( "I would really like an image to be displayed here.")], left = 0, top = 0) self._main_frame.place( self._sub_frame ) self.place( self._main_frame, left = self._nav_frame.right, top = 20, sticky = "nsew" )
def __init__(self, *args, **kwargs): Window.__init__(self, *args, **kwargs)
def __init__( self ): Window.__init__( self, title='Options' ) self.resolution_field = TextField(text='1', width=OptionWindow.width) resolution_frame = LabeledItemFrame( 'Resolution (Hz):', self.resolution_field ) self.frequency_field = TextField(text='6400', width=OptionWindow.width) frequency_frame = LabeledItemFrame( 'Sampling frequency (Hz)', self.frequency_field ) detrending_buttons = [RadioButton(title='none', value='none'), RadioButton(title='mean', value='mean'), RadioButton(title='linear', value='linear')] detrending_column = Column(detrending_buttons) detrending_frame = LabeledItemFrame('Detrending', detrending_column) self.detrending_group = RadioGroup(detrending_buttons) self.detrending_group.value = 'none' windowing_buttons = [RadioButton(title='Hanning', value='hanning'), RadioButton(title='none', value='none'), RadioButton(title='Blackman', value='blackman'), RadioButton(title='Hamming', value='hamming'), RadioButton(title='Bartlett', value='bartlett')] windowing_column = Column(windowing_buttons) windowing_frame = LabeledItemFrame('Windowing', windowing_column) self.windowing_group = RadioGroup(windowing_buttons) self.windowing_group.value = 'hanning' self.xscale_box = CheckBox(title='X-axis log scale', value=0) self.yscale_box = CheckBox(title='Y-axis log scale', value=1) self.sqrt_box = CheckBox(title='Square root', value=0) self.against_time_box = CheckBox(title='Plot against time', value=0, action=self.toggle_against_time) self.slice_field = TextField(text='0:10000:1', width=OptionWindow.width, enabled=self.against_time_box.value) slice_frame = LabeledItemFrame('Range (start:stop:step)', self.slice_field) self.place_column( [resolution_frame, frequency_frame, detrending_frame, #windowing_frame, # Commented because we may never want to use it self.xscale_box, self.yscale_box, self.sqrt_box, self.against_time_box, slice_frame], left=5, top=5 ) self.shrink_wrap()
def __init__(self, **kwds): Window.__init__(self, **kwds) self.__set_to_initial_state()
def __init__(self, style="nonmodal_dialog", closable=0, zoomable=0, resizable=0, **kwds): if "title" not in kwds: kwds["title"] = Globals.application_name Window.__init__(self, style=style, closable=closable, zoomable=zoomable, resizable=resizable, **kwds)