class Frames(Sink): def __init__(self): Sink.__init__(self) self.frame=Frame(self.baseURL() + "rembrandt/LaMarcheNocturne.html") self.frame.setWidth("100%") self.frame.setHeight("48em") self.initWidget(self.frame)
def __init__(self): DialogBox.__init__(self) self.setText("Sample DialogBox with embedded Frame") iframe = Frame(Popups().baseURL() + "rembrandt/LaMarcheNocturne.html") closeButton = Button("Close", self) msg = HTML("<center>This is an example of a standard dialog box component.<br> You can put pretty much anything you like into it,<br>such as the following IFRAME:</center>", True) dock = DockPanel() dock.setSpacing(4) dock.add(closeButton, DockPanel.SOUTH) dock.add(msg, DockPanel.NORTH) dock.add(iframe, DockPanel.CENTER) dock.setCellHorizontalAlignment(closeButton, HasAlignment.ALIGN_RIGHT) dock.setCellWidth(iframe, "100%") dock.setWidth("100%") iframe.setWidth("36em") iframe.setHeight("20em") self.setWidget(dock)