def __init__(self): PopupPanel.__init__(self, True) contents = HTML("Click anywhere outside this popup to make it disappear.") contents.setWidth("128px") self.setWidget(contents) self.setStyleName("ks-popups-Popup")
def __init__(self): PopupPanel.__init__(self, True) contents = HTML("Click anywhere outside this popup to make it disappear.") contents.setWidth("128px") self.add(contents) self.setStyleName("ks-popups-Popup")
def __init__(self, sender, offsetX, offsetY, text, show_delay, hide_delay, styleName): global tooltip_hide_timer PopupPanel.__init__(self, True) self.show_delay = show_delay self.hide_delay = hide_delay contents = HTML(text) self.add(contents) left = sender.getAbsoluteLeft() + offsetX top = sender.getAbsoluteTop() + offsetY self.setPopupPosition(left, top) self.setStyleName(styleName) if tooltip_hide_timer: self.tooltip_show_timer = Timer(1, self) else: self.tooltip_show_timer = Timer(self.show_delay, self)
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")