def set_cols(self, cols): self.__cols = cols lv = self.components.lvwListado # remove old columns: lv.clear_all() # insert new columns for col in cols: ch = gui.ListColumn(lv, name=col, text=col.replace("_", " ").title(), align="left")
height='50', left='665', top='532', width='100', filename='logo-pyafipws.png', ) with gui.ListView( name='listado', height='353', left='7', top='168', width='775', item_count=0, sort_column=-1, ): gui.ListColumn(name=u'tipo_cbte', text='Tipo Cbte') gui.ListColumn(name=u'punto_vta', text='Punto Venta', represent="%s", width=50, align="right") gui.ListColumn(name=u'cbte_nro', text='Nro Cbte', represent="%s", align="right") gui.ListColumn(name=u'fecha_cbte', text='Fecha Cbte', align="center") gui.ListColumn(name=u'tipo_doc', text='Tipo Doc', width=50) gui.ListColumn(name=u'nro_doc', text='Nro Doc',
top='23', width='240', value=u'', onchange=on_busqueda) nTop = str(int(nTop) + 80) with gui.ListView( name='listado', height='353', left='7', top=nTop, width='775', item_count=0, sort_column=-1, ): gui.ListColumn(name=u'tipo_doc', text='Tipo Doc', width=50) gui.ListColumn(name=u'nro_doc', text='Nro Doc', width=100, represent="%s", align="right") gui.ListColumn(name=u'nombre_cliente', text='Cliente', width=150) gui.Button(label=u'Salir', name='close', sizer_border=4, top=nTop, left='510') gui.Image( name='imgsistema',
gui.Button(label='File', name='choose_image', left='80', top='300', width='85', default=True, parent='mywin.notebook.tab_message', onclick=ui.choose_image) gui.TextBox(name='filename', left='166', top='301', parent='mywin.notebook.tab_message', value='') # buttons gui.Button(label='Send', name='send', left='80', top='326', width='85', default=True, parent='mywin.notebook.tab_message') gui.StatusBar(name='statusbar', parent='mywin') #### list #### gui.Label(name='label_page', left='10', top='5', parent='mywin.notebook.tab_list', text='Page : 0/0') gui.Button(label='Prev', name='prev', left='100', top='5', width='85', default=True, parent='mywin.notebook.tab_list', onclick=ui.refresh_prev) gui.Button(label='Next', name='next', left='190', top='5', width='85', default=True, parent='mywin.notebook.tab_list', onclick=ui.refresh_next) gui.Button(label='Refresh', name='refresh', left='290', top='5', width='85', default=True, parent='mywin.notebook.tab_list', onclick=ui.refresh_status) gui.ListView(name='listview', height='320', left='0', top='30', width='590', item_count=27, parent='mywin.notebook.tab_list', sort_column=0, onitemselected="print ('sel %s' % event.target.get_selected_items())", ) gui.ListColumn(name='col_accepted_time', text='Date', parent='listview', ) gui.ListColumn(name='col_callno', text='Phone Number', parent='listview', ) gui.ListColumn(name='col_status', text='Status', width=20, parent='listview', ) gui.ListColumn(name='col_resultcode', text='Result Code', width=26, parent='listview', ) gui.ListColumn(name='col_resultmessage', text='Result Message', parent='listview', ) gui.ListColumn(name='col_sent_time', text='Sent time', parent='listview', ) gui.ListColumn(name='col_text', text='Text', parent='listview', ) mywin = gui.get("mywin") mywin.onload = ui.load mywin['notebook']['tab_message']['send'].onclick = ui.send_message mywin['menubar']['menu']['menu_quit'].onclick = ui.close_window if __name__ == "__main__": mywin.show()