python怎么让按钮透明_是否可以使按钮透明(Kivy)

在Kivy中能使Button透明吗?在

以下是页面代码,仅供参考:class home(Screen):

def __init__(self,**kwargs):

super (home,self).__init__(**kwargs)

bkg = GridLayout(cols = 1)

i = Image(source='/Users/User/Downloads/im3.jpg',y = bkg.height)

bkg.add_widget(i)

my_box1 = BoxLayout(orientation='vertical')

my_button1 = Button(text="Run tests",size_hint_y=None, size_y=100)

my_button2 = Button(text="View VG images",size_hint_y=None, size_y=100)

my_button3 = Button(text="View test logs",size_hint_y=None, size_y=100)

my_button1.bind(on_press=self.run)

my_button2.bind(on_press=self.vg)

my_button3.bind(on_press=self.logs)

my_box1.add_widget(my_button1)

my_box1.add_widget(my_button2)

my_box1.add_widget(my_button3)

self.add_widget(bkg)

self.add_widget(my_box1)

def run(self,*args):

self.manager.current = 'RunTests'

def vg(self,*args):

self.manager.current = 'vgMenu'

def logs(self,*args):

self.manager.current = 'logs'

你可能感兴趣的:(python怎么让按钮透明)