I've been wondering if there is a way to remove the title bar of a popup window:
From this
To this
Thanks in advance!
Edit: Code reference for future use:
<MyPopup@Popup>:
size_hint: None, None
size: 300, 200
title: 'Close'
title_color: 0.7, 0, 0, 0.9
separator_color: 0.4, 0.4, 0.4, 1
title_align: 'center'
BoxLayout:
orientation: 'vertical'
padding: 5, 5, 5, 5
cols: 2
Label:
color: 0.7, 0, 0, 0.9
center_x: root.center_x
center_y: root.center_y
text: 'Are you sure you want to exit?'
BoxLayout:
size_hint: 1, 0.6
Button:
color: 0.7, 0, 0, 0.9
background_color: 0.4, 0.4, 0.4, 0.05
text: 'Yes'
on_release: exit()
Button:
color: 0.7, 0, 0, 0.9
background_color: 0.4, 0.4, 0.4, 0.05
text: 'No'
on_release: root.dismiss()
Use a ModalView instead. This is the base class for popup-style behaviour, Popup is a ModalView with the title added.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With