Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/selection_entry_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'selection_entry_test.py')
-rw-r--r--selection_entry_test.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/selection_entry_test.py b/selection_entry_test.py
new file mode 100644
index 0000000..f97e45a
--- /dev/null
+++ b/selection_entry_test.py
@@ -0,0 +1,23 @@
+from gi.repository import Gtk
+
+class Test(Gtk.Window):
+
+ def __init__(self):
+ super(Test, self).__init__()
+ self.connect("destroy", Gtk.main_quit)
+ vbox = Gtk.VBox()
+ self.entry = Gtk.Entry()
+ vbox.add(self.entry)
+
+ button1 = Gtk.Button('Get bounds')
+ button1.connect('clicked', self.__get_text_cb)
+ vbox.add(button1)
+
+ self.add(vbox)
+ self.show_all()
+
+ def __get_text_cb(self, button):
+ print self.entry.get_selection_bounds()
+
+Test()
+Gtk.main()