def main(): frm = gui.form(label="my second form", doc="""\ Please enter your personal data. Don't worry about your privacy. You can trust us. """) frm.addEntry("firstName", STRING, label="first name") frm.addEntry("name", STRING) btnPanel = frm.addHPanel() btnPanel.addOkButton() btnPanel.addCancelButton() btnPanel.addButton( label="&Privacy statement", doc="Click here if you really cannot trust us.").setHandler( privacy, frm) if frm.showModal(): print "Hello %s %s. Thank you for registering." % ( frm.entries.firstName.getValue(), frm.entries.name.getValue()) else: print "You canceled the form."
def main(): frm = gui.form(label="my second form", doc="""\ Please enter your personal data. Don't worry about your privacy. You can trust us. """) frm.addEntry("firstName",STRING,label="first name") frm.addEntry("name",STRING) btnPanel = frm.addHPanel() btnPanel.addOkButton() btnPanel.addCancelButton() btnPanel.addButton( label="&Privacy statement", doc="Click here if you really cannot trust us." ).setHandler(privacy,frm) if frm.showModal(): print "Hello %s %s. Thank you for registering." % ( frm.entries.firstName.getValue(), frm.entries.name.getValue()) else: print "You canceled the form."
def main(): sess = demo.beginSession() ds = sess.query(Partners,"name firstName email phone city id") frm = gui.form() ds.setupForm(frm) frm.show()
## Lino is distributed in the hope that it will be useful, but WITHOUT ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public ## License for more details. ## You should have received a copy of the GNU General Public License ## along with Lino; if not, write to the Free Software Foundation, ## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA from lino.forms import gui if __name__ == "__main__": gui.parse_args() frm = gui.form(label="The First Lino Form") frm.addLabel("""\ Please enter your personal data. Don't worry about your privacy. You can trust us. """) firstName = frm.addEntry("firstName", label="First name") name = frm.addEntry("name") frm.addOkButton() frm.addCancelButton() if frm.showModal(): print "Hello %s %s. Thank you for registering." % ( #frm.entries.firstName.getValue(),
## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public ## License for more details. ## You should have received a copy of the GNU General Public License ## along with Lino; if not, write to the Free Software Foundation, ## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA from lino.forms import gui if __name__ == "__main__": gui.parse_args() frm = gui.form(label="The First Lino Form") frm.addLabel("""\ Please enter your personal data. Don't worry about your privacy. You can trust us. """) firstName = frm.addEntry("firstName",label="First name") name = frm.addEntry("name") frm.addOkButton() frm.addCancelButton() if frm.showModal(): print "Hello %s %s. Thank you for registering." % ( #frm.entries.firstName.getValue(),
from jobs1 import work from lino.ui import console from lino.forms import gui if __name__ == "__main__": print "This example currently broken." if False: gui.parse_args() frm = gui.form("Demonstrating Job") frm.addButton("with").setHandler(work, True) frm.addButton("without").setHandler(work, False) frm.show()
from jobs1 import work from lino.ui import console from lino.forms import gui if __name__ == "__main__": print "This example currently broken." if False: gui.parse_args() frm = gui.form("Demonstrating Job") frm.addButton("with").setHandler(work,True) frm.addButton("without").setHandler(work,False) frm.show()
def main(): sess = demo.beginSession() ds = sess.query(Partners, "name firstName email phone city id") frm = gui.form() ds.setupForm(frm) frm.show()
## This file is part of the Lino project. ## Lino is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## Lino is distributed in the hope that it will be useful, but WITHOUT ## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public ## License for more details. ## You should have received a copy of the GNU General Public License ## along with Lino; if not, write to the Free Software Foundation, ## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA from lino.forms import gui from lino.schemas.sprl import demo from lino.schemas.sprl.tables import Partners gui.parse_args() #sess = demo.startup(ui=gui) sess = demo.startup() ds = sess.query(Partners, orderBy="name") frm = gui.form(label="The first DataGrid Form") frm.addDataGrid(ds) frm.show()