Skip to main content

MDFillRoundFlatIconButton

CREATING A FILL ROUND FLAT ICON  BUTTON USING KIVYMD  





Video Link on You Tube - https://youtu.be/lAvrGEr3RFo



Following are the steps that are required to create Fill Round Flat Icon Button :

  



1. Creating the App by importing the MDApp class of kivymd module.
2. Creating the Screen by using MDScreen class of kivymd module.
3. Creating a button using MDFillRoundFlatIconButton class of kivymd module. 

First Create a Python file (extension .py) then, create a kivy file (.kv extension) name of kivy file should be same as app name.

App name is the name of the class that consist of build function and created by inheriting the MDApp class

Following is the list of attributes used in this program :-

Attributes of MDScreen class
1. md_bg_color - To change the background color 
2. radius - to change the corner radius of screen

Attributes of MDFillRoundFlatIconButton class
1. text - Text to be printed in the button (takes string)
2. icon - name of icon to be printed on the button.

Note :- you can get the list of ICON name by using this url 

3. pos_hint -  To place the button at particular position (takes float values)
4. size_hint -  To change the height of button (Takes float type values like .2,.4 , .3,.5 and None,None)

Note :-  Here .2 indicates the 20th part of the screen on y axis 

5. size -  used when the value of size_hint is None,None (Takes numeric value like 100,200)
6. theme_text_color : To change the color of icon (Values Primary, Secondary, Hint, Error and Custom)

Note : When the value of theme_text_color is Custom then we can use text_color attribute to change the color.

7. text_color - To change the color of icon (Takes color values in rgb fromat)
8. font_size - To increase font size of button (takes numeric value)
9. md_bg_color : To change the background color of button takes color name in rgb format. 
10. on_press - Action to be performed when button is pressed
11.on_release - Action to be performed when the button is released

Following is the code of this program :-


# Code of Python Program

from kivymd.app import MDApp

class Myapp(MDApp):
    def build(self):
        return
    def callback(self):
        print("MDFillRoundFlatButton is pressed")

Myapp().run()

# Save it by .py extension

# Code of Kivy file

MDScreen :
    MDFillRoundFlatIconButton :
        text : 'MDFillRoundFlatIconButton'
        icon : "language-python"
        pos_hint : {"center_x":.5,"center_y":.5}
        theme_text_color : "Custom"
        text_color : [0,0,1,1]
        md_bg_color : [0,1,0,1]
        font_size : 30
        size_hint : None,None
        size : 280,35
        on_press : app.callback()

# Save it by name Myapp.kv 


Comments

Popular posts from this blog

MDTextFieldRound

TAKING INPUT FROM USER USING MDTEXTFIELDROUND WIDGET Link of Video on You Tube -  https://youtu.be/b5B9KkYa1Mo Following are the steps that are required to take input from user :    1. Creating the App by importing the MDApp class of kivymd module. 2. Creating the Screen by using MDScreen class of kivymd module. 3. Creating Text Field using MDTextFieldRound Class First Create a Python file (extension .py) then, create a kivy file (.kv extension) name of kivy file should be same as app name. App name is the name of the class that consist of b uild function and created by inheriting the MDApp class Following is the list of attributes used in this program :- Attributes of MDScreen class 1. md_bg_color - To change the background color  2. radius - to change the corner radius of screen Attributes of MDTextFieldRound class 1. hint_text - To print hint text on text field (Takes String). 2. pos_hint - To change the position of button (Takes values in dictionary format like p...

MDBackdrop Panel

 CREATING BACKDROP PANEL USING KIVYMD Following are the steps that are required to create a Backdrop panel :    1. Creating the App by importing the MDApp class of kivymd module. 2. Creating the Screen using MDScreen class. 3. Creating the Backdrop panel using MDBackdrop class. First Create a Python file (extension .py) then, create a kivy file (.kv extension) name of kivy file should be same as app name. App name is the name of the class that consist of b uild function and created by inheriting the MDApp class Following is the list of attributes used in this program :- Attributes of MDScreen class 1. md_ bg_color - To change the background color (Takes values in RGB format). 2. radius - to change the corner radius of screen. Attributes of MDBackdrop class 1. title - Title of Backdrop panel (Takes string). 2. header - Used to print header text (Takes True or False). 2. header_text - Heading of backdrop panel (takes String). 4. background_color -  To change the b...

Attendence Soft.. (Project)

DESIGNING A ATTENDENCE SOFTWARE USING PYTHON AND KIVYMD FRAMEWORK Imp Note -  First Create a Python file (extension .py) then, create a kivy file (.kv extension) name of kivy file should be same as app name. App name is the name of the class that consist of b uild function and created by inheriting the MDApp class. For this Program First Create a file by name Main.py and write python code in this file and then create a new file by name MainApp.kv and write kivy code in that file. Following is the code of this Software :- 1. Code of Python program - # Code of python Program # A Python Program to create a Attendence Software using KIVYMD Frame work from kivymd.app import MDApp from kivymd.uix.list import MDList , IRightBodyTouch , OneLineAvatarIconListItem from kivy.properties import StringProperty from kivymd.uix.selectioncontrol import MDCheckbox from kivy.core.window import Window from kivymd.uix.boxlayout import BoxLayout from kivymd.uix.label import MDLabel Window.size = ( 370 ,...