Beispiel #1
0
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."
Beispiel #2
0
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."
Beispiel #3
0
def main():
    sess = demo.beginSession()
    ds = sess.query(Partners,"name firstName email phone city id")
    frm = gui.form()
    ds.setupForm(frm)
    frm.show()
Beispiel #4
0
## 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(),
Beispiel #5
0
## 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(),
Beispiel #6
0
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()
Beispiel #7
0
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()
    
Beispiel #8
0
def main():
    sess = demo.beginSession()
    ds = sess.query(Partners, "name firstName email phone city id")
    frm = gui.form()
    ds.setupForm(frm)
    frm.show()
Beispiel #9
0
## 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()