Problem when trying to make a circular button on kivy

simon
from kivy.uix.button import Button
from kivy.uix.behaviors.button import ButtonBehavior
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.image import Image
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.clock import Clock
from kivy.uix.widget import Widget
from kivy.graphics import BorderImage
from kivy.graphics import Color, RoundedRectangle, Rectangle, Triangle
from kivy.core.window import Window
#from kivy.config import Config
from kivy.uix.checkbox import CheckBox 
from kivy.uix.popup import Popup
from kivy.uix.scrollview import ScrollView
from kivy.uix.filechooser import FileChooserListView
from kivy.properties import ObjectProperty


class OpeningPage(FloatLayout):
    def __init__(self, **kwargs): 
        super().__init__(**kwargs)
        
        
        self.but = RoButton(text = 'START', pos = (350,100), font_size=14, size=(100,60), size_hint=(None,None))
        self.add_widget(self.but)
            
                   
class RoButton(Button):
    butt = ObjectProperty()
  
    def __init__(self, **kwargs): 
        super(RoButton, self).__init__(**kwargs)
        text = self.text
        with self.canvas:
           # Color(1., 0, 0)
            self.butt = RoundedRectangle( size= self.size, pos = self.pos, radius =[400])
                      

class UI(App):
    def build(self):
        
        self.screen_manager = ScreenManager()
        
        self.opening_page = OpeningPage()
        screen = Screen(name ='Opening_Page')
        screen.add_widget(self.opening_page)
        self.screen_manager.add_widget(screen)
         
        return self.screen_manager



if __name__ == '__main__':
    the_app = UI()
    the_app.run()   

Everytime I try to make a circular button using this code I get a box behind the circle. I tried doing self.canvas.before but still no luck if possible could answers be in python rather than .kv language thanks. Attached image of problem]1

inclement

The box you see is the normal Button image. If you don't want that, probably don't use a Button, instead use class RoButton(ButtonBehavior, Widget):.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How to make circular progress bar in kivy?

Trying to make a basic sliding puzzle game in java but running across a problem when trying to test

Circular JSON, when trying to stringify a JS object

How to make a circular ripple on a button when it's being clicked?

Make Circular Button with Border

tvOS: How do I make a circular button that still gets a shadow when focused?

How to make a circular button out of a PNG image?

Is it possible to make a button transparent (Kivy)

Trying to make a button smaller

Make a circular button programatically

Trying to make a button in html with javascript

Trying to make an Exit Button

how to make a circular button in Winforms

Error trying to make a circular UIView in Swift

Trying to make a button display something when another button is clicked (C#)

How to make an animated circular progress button for android?

KIVY python: make button clickable in python code

When trying to make variable columns in kivy only one column appears

Trying to make a button on kivy with the size of a stretched image

Problem when trying to make request with proxy

JAVAFX Problem trying to play sound when clicking button

i am trying to make the add button add another 3 textinput boxes in kivy

How create a circular button with kivy?

flutter problem : How to make country image in circular?

Problem with adding checkmark/radio button in kivy

Problem when trying to create a left-aligned text using kivy

I have a problem when trying to access a button or an AppCompatEditText

Trying to make unity only continue the script when a button is pressed

How to make the border appear when hovering over a button in Kivy