Hi, need some help. This is my first hand coded form, I need it to be
hand coded because the form's menu will be data driven.
So I just wanted a blue form with a menu, this is what I've come up so
far (obviously does not do what I want).
Any kind soul wishes to point out what I'm doing wrong? TIA
---------------------------------------------------------------------------------------------------------
# -*- coding: utf-8 -*-

import dabo
dabo.ui.loadUI("wx")

def doOpen():
        dabo.ui.info('Función Open ejecutada', title='Atención!')

def doClose():
        dabo.ui.info('Función Close ejecutada', title='Atención!')

def doEdit():
        dabo.ui.info('Función Edit ejecutada', title='Atención!')

def main():
        app = dabo.dApp()
        app.setup()
        # instantiate the form
        form = dabo.ui.dForm(app.MainForm, Caption="Hello, Dabo users!")

        mb = dabo.ui.dMenuBar()
        mfile = dabo.ui.dMenu()
        mfile.Caption = '&File'
        mfile.append('Open', HotKey='Ctrl+D', OnHit=doOpen, help='Abrir
un archivo')
        mfile.append('Close', HotKey='Ctrl+L', OnHit=doClose,
help='Cerrar un archivo')
        mfile.appendSeparator()
        mfile.append('Edit', HotKey='Ctrl+E', OnHit=doEdit, help='Editar
algo')

        panel = dabo.ui.dPanel(form)
        panel.BackColor = 'blue'
        panel.Sizer = dabo.ui.dSizer("v")
        #form.addObject(dabo.ui.dPanel, "tbox")
        #form.tbox.Value = "Cool stuff!"
        #form.tbox.FontBold = True
        # show the form
        app.SetMenuBar(mb)
        form.Show()
        app.start()

if __name__ == '__main__':
        main()
---------------------------------------------------------------------------------------------------------


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to