Changes

Jump to navigation Jump to search
Line 20: Line 20:  
  self.vbox = Gtk.VBox(False, 0)
 
  self.vbox = Gtk.VBox(False, 0)
 
  self.vbox.set_size_request(
 
  self.vbox.set_size_request(
Gdk.Screen.width(), Gdk.Screen.height() - style.GRID_CELL_SIZE)
+
    Gdk.Screen.width(),
 +
    Gdk.Screen.height() - style.GRID_CELL_SIZE)
 
  self.fixed.put(self.vbox, 0, 0)
 
  self.fixed.put(self.vbox, 0, 0)
 
  self.vbox.show()
 
  self.vbox.show()
Line 54: Line 55:     
'''4.''' The interaction is as follows: (1) in the button_press event, show the TextView widget and move it into position; (2) the on-screen keyboard will appear when the TextView is clicked;  (3) when exiting the TextView, get the text from the buffer and then hide the widget.
 
'''4.''' The interaction is as follows: (1) in the button_press event, show the TextView widget and move it into position; (2) the on-screen keyboard will appear when the TextView is clicked;  (3) when exiting the TextView, get the text from the buffer and then hide the widget.
      
  self.text_buffer = self.text_entry.get_buffer()
 
  self.text_buffer = self.text_entry.get_buffer()
Line 64: Line 64:  
     text = self.text_buffer.get_text(bounds[0], bounds[1], True)
 
     text = self.text_buffer.get_text(bounds[0], bounds[1], True)
 
     # Do something with text
 
     # Do something with text
 
+
    # Then hide the TextView widget
 
     self.text_entry.hide()
 
     self.text_entry.hide()
  

Navigation menu