Hi,
I've a simple gui and i don't know but the components in which i use
layout='expand' aren't properly expanded in the panel.
The textbox should take the entire width of the panel but it doesn't.
Is it more correct to extend dForm and have a panel as an attribute or
extend the panel and having the dForm as an attribute ?
In which case i can have multiple dForm in a Panel ? Does it have sense ?
Thanks,
Emanuele
# -*- coding: utf-8 -*-
import dabo
if __name__ == "__main__":
dabo.ui.loadUI("wx")
import os
from GrdBase import GrdBase
import dabo.dEvents as dEvents
from KISSForm import KISSForm
import biz
import utils
class ListaMenu(dabo.ui.dForm):
"""
serve per creare nuovi menu che poi serviranno per essere
associati agli articoli
"""
def afterInit(self):
# you will need a dPanel or the tab key will not work
self.Sizer = dabo.ui.dSizer("vertical")
panel = dabo.ui.dPanel(self)
gsz = dabo.ui.dGridSizer(MaxCols = 2, VGap=5, HGap=10)
gsz.append(dabo.ui.dLabel(panel, Caption='Descrizione'))
gsz.append(dabo.ui.dTextBox(panel), layout='expand')
gsz.append(dabo.ui.dLabel(panel, Caption='Descrizioni'))
self.descrizioniMenu = dabo.ui.dListBox(panel)
gsz.append(self.descrizioniMenu, layout='expand')
vs = panel.Sizer = dabo.ui.dSizer('v')
vs.append(gsz)
vs.appendSpacer(10)
self.Sizer.append(panel, layout='expand')
gsz.setColExpand(True, 1)
panel.layout()
self.layout()
#dabo.ui.callAfter(self.populateList)
import sys
import os
import dabo
# The loading of the UI needs to happen before the importing of the
# db, biz, and ui packages:
import db
import biz
import ui
app = dabo.dApp(MainFormClass = ListaMenu)
app.db = db
app.biz = biz
app.ui = ui
if __name__ == '__main__':
app = dabo.dApp(MainFormClass = ui.ListaMenu)
sys.path.append(os.path.join(app.HomeDirectory, "resources"))
# Set the BasePrefKey for the app
app.BasePrefKey = "sagra"
app.setup()
# Start the application event loop:
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]