''' Bubble ====== Test of the widget Bubble. ''' from kivy.app import App from kivy.uix.floatlayout import FloatLayout from kivy.uix.button import Button from kivy.lang import Builder from kivy.uix.bubble import Bubble
from kivy.app import App from kivy.uix.floatlayout import FloatLayout from kivy.uix.bubble import Bubble, BubbleButton from kivy.uix.label import Label from kivy.properties import ObjectProperty from kivy.lang import Builder
Clipboard = None from kivy.core.clipboard import Clipboard from kivy.clock import Clock
import time classCustomBubbleButton(BubbleButton): pass
defshow_bubble(self, *l): # If you annotate this line, the wedge would survive from self.REMOVE by clicking the bubble. ifnothasattr(self, 'bubb'): self.bubb = bubb = NumericKeyboard() self.bubb.arrow_pos = "bottom_mid" self.add_widget(self.bubb) # close the bubble after 3s Clock.schedule_once(self.REMOVE, 3) #self.remove_widget(self.bubb)
Builder.load_file("test.kv")
classTestBubbleApp(App): title = "Numeric Key Pad - Using Bubble"