def reply_box(self, button, thr_id):
subject = ur.Edit(("blue", "Subject: "), wrap="clip")
name = ur.Edit(("blue", "Name: "), "Anonymous", wrap="clip")
if thr_id == -1:
text = ur.Edit(multiline=True)
else:
text = ur.Edit(edit_text=">>" + thr_id, multiline=True)
post_btn = ur.AttrMap(ur.Button(
"Post", self.add_post, (subject, name, text, thr_id)),
"green", "b_green")
box = ur.LineBox(ur.ListBox(ur.SimpleFocusListWalker(
[name, subject, ur.LineBox(text, "Post text"),
self.parent.div, post_btn])))
self.loop.Widget = MyOverlay(
box, self.loop.baseWidget,
"center", ("relative", 100), "top", ("relative", 100),
None, None,
self.parent.margin, self.parent.margin,
int(self.loop.dimensions[1] * 0.3),
int(self.loop.dimensions[1] * 0.3),
self.parent)
评论列表
文章目录