Пример #1
0
 def __init__(self):
     PopupPanel.__init__(self, True)
     
     contents = HTML("Click anywhere outside this popup to make it disappear.")
     contents.setWidth("128px")
     contents.setHeight("128px")
     self.setWidget(contents)
     
     self.setStyleName("ks-popups-Popup")
Пример #2
0
    def __init__(self, contact):
        # The popup's constructor's argument is a boolean specifying that it
        # auto-close itself when the user clicks outside of it.

        PopupPanel.__init__(self, True)

        inner = VerticalPanel()
        nameLabel = Label(contact.name)
        emailLabel = Label(contact.email)
        inner.add(nameLabel)
        inner.add(emailLabel)
        
        panel = HorizontalPanel()
        panel.setSpacing(4)
        panel.add(Image(contact.photo))
        panel.add(inner)
        
        self.add(panel)
        self.setStyleName("mail-ContactPopup")
        nameLabel.setStyleName("mail-ContactPopupName")
        emailLabel.setStyleName("mail-ContactPopupEmail")