21 lines
381 B
Python
21 lines
381 B
Python
#!/usr/bin/env python3
|
|
|
|
import gi
|
|
gi.require_version('Gtk', '3.0')
|
|
from gi.repository import Gtk
|
|
|
|
|
|
class TextBox(Gtk.Box):
|
|
def __init__(self, width, height):
|
|
Gtk.Box.__init__(self)
|
|
|
|
self.set_size_request(width, height)
|
|
|
|
self.label = Gtk.Label()
|
|
self.add(self.label)
|
|
|
|
|
|
|
|
def set_text(self, string):
|
|
self.label.set_text('孙晓 - 丹歌惊鸿')
|
|
return self |