Thanks a lot John, with some tinkering I got what I wanted (see below).
One little thing though, the Maximize method gets the window to be the
size of the screen but it is not really maximized (if I take the mouse
to a border I can change it's size, and I have the "maximize" button
instead of the "restore" button). Am I doing it wrong or is it a bug?

--------------------------------------------------------------------------------------------------------------------
# -*- coding: utf-8 -*-

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


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

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

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

class MainForm(dabo.ui.dForm):
    def afterInit(self):
        self.Caption="Hello, Dabo users!"
        self.MenuBar = 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='Editaralgo')
        self.MenuBar.appendMenu(mfile)
        self.BackColor = 'blue'
        self.Maximize()       


if __name__ == '__main__':
    app = dabo.dApp()
    app.MainFormClass = MainForm
    app.start()

--------------------------------------------------------------------------------------------------------------------


_______________________________________________
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