Mercurial > libervia-web
comparison browser_side/dialog.py @ 49:f1d2eb9b2523
browser side: added about box
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 26 May 2011 19:15:44 +0200 |
parents | 153de5d461a4 |
children | 4419ef07bb2b |
comparison
equal
deleted
inserted
replaced
48:153de5d461a4 | 49:f1d2eb9b2523 |
---|---|
122 @param body: widget put in the body""" | 122 @param body: widget put in the body""" |
123 DialogBox.__init__(self, centered=True) | 123 DialogBox.__init__(self, centered=True) |
124 self.callback = callback | 124 self.callback = callback |
125 _body = VerticalPanel() | 125 _body = VerticalPanel() |
126 _body.setSize('100%','100%') | 126 _body.setSize('100%','100%') |
127 _body.setHorizontalAlignment(HasAlignment.ALIGN_CENTER) | |
128 _body.setSpacing(4) | 127 _body.setSpacing(4) |
129 _body.add(widget) | 128 _body.add(widget) |
130 _body.setCellWidth(widget, '100%') | 129 _body.setCellWidth(widget, '100%') |
131 _body.add(Button("Close", self.onClose)) | 130 _close_button = Button("Close", self.onClose) |
131 _body.add(_close_button) | |
132 _body.setCellHorizontalAlignment(_close_button, HasAlignment.ALIGN_CENTER) | |
132 self.setHTML(title) | 133 self.setHTML(title) |
133 self.setWidget(_body) | 134 self.setWidget(_body) |
134 self.panel.setWidth('100%') | 135 self.panel.setWidth('100%') |
135 | 136 |
136 def onClose(self): | 137 def onClose(self): |