How to make app full screen with border

122 views
Skip to first unread message

Electronic Part

unread,
Jan 5, 2020, 2:27:33 AM1/5/20
to Kivy users support
Hello,

I have an app that i want to start it full screen. I checked some solution but they all delete the border.
I used following command. As i said i will lose my border 

 Window.fullscreen = 'auto' 


Can you please tell me a way to do that? Thanks

Elliot Garbus

unread,
Jan 5, 2020, 10:42:31 AM1/5/20
to kivy-...@googlegroups.com

Put this at the very top of your main file.

 

from kivy.config import Config
Config.set(
'graphics', 'window_state', 'maximized')

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/a3b893b4-f1ad-401b-bf0b-2fa68af71d20%40googlegroups.com.

 

Electronic Part

unread,
Jan 5, 2020, 11:55:01 PM1/5/20
to kivy-...@googlegroups.com
Thanks for the answer. That is not working. Should i put this in the specific place. I mean in build function or something else?

Elliot Garbus

unread,
Jan 6, 2020, 12:03:49 AM1/6/20
to kivy-...@googlegroups.com

At the very top of your main file

 

 

 

Electronic Part

unread,
Jan 6, 2020, 12:21:22 AM1/6/20
to kivy-...@googlegroups.com
This is how my app looks. As you see it is full screen but on button left and also i don't have any windows border
image.png

Electronic Part

unread,
Jan 6, 2020, 12:29:18 AM1/6/20
to kivy-...@googlegroups.com
I used these commands
Config.set('graphics', 'window_state', 'maximized')
Config.write()

Elliot Garbus

unread,
Jan 6, 2020, 12:32:50 AM1/6/20
to kivy-...@googlegroups.com

Show your code.  It must be on the top of the first file.  The Config.write() is not necessary. 

What platform are you on?  (FWIW: I can’t see

 

 

 

From: Electronic Part
Sent: Sunday, January 5, 2020 10:29 PM
To: kivy-...@googlegroups.com
Subject: Re: [kivy-users] How to make app full screen with border

 

I used these commands

Config.set('graphics', 'window_state', 'maximized')
Config.write()

On Mon, Jan 6, 2020 at 8:51 AM Electronic Part <hsiel...@gmail.com> wrote:

This is how my app looks. As you see it is full screen but on button left and also i don't have any windows border

Electronic Part

unread,
Jan 6, 2020, 12:43:23 AM1/6/20
to kivy-...@googlegroups.com
For some reason i can't take screen shot. How can i get be to my last configuration. This is awful 
if __name__ == "__main__":
# Config.set('graphics', 'fullscreen', 'auto')
    Config.set('graphics', 'window_state', 'maximized')
    # Config.write()
my_app = MyMainApp()
my_app.run()

Elliot Garbus

unread,
Jan 6, 2020, 12:44:59 AM1/6/20
to kivy-...@googlegroups.com
Put  the code at the top of the file before you import kivy. 

Sent from my iPhone

On Jan 5, 2020, at 10:43 PM, Electronic Part <hsiel...@gmail.com> wrote:


For some reason i can't take screen shot. How can i get be to my last configuration. This is awful 
if __name__ == "__main__":
# Config.set('graphics', 'fullscreen', 'auto')
Config.set('graphics', 'window_state', 'maximized')
# Config.write()
my_app = MyMainApp()
my_app.run()

On Mon, Jan 6, 2020 at 9:02 AM Elliot Garbus <elli...@cox.net> wrote:

Show your code.  It must be on the top of the first file.  The Config.write() is not necessary. 

What platform are you on?  (FWIW: I can’t see

 

 

 

From: Electronic Part
Sent: Sunday, January 5, 2020 10:29 PM
To: kivy-...@googlegroups.com
Subject: Re: [kivy-users] How to make app full screen with border

 

I used these commands

Config.set('graphics', 'window_state', 'maximized')
Config.write()

 

On Mon, Jan 6, 2020 at 8:51 AM Electronic Part <hsiel...@gmail.com> wrote:

This is how my app looks. As you see it is full screen but on button left and also i don't have any windows border

<ADFF418681D448D0BF0BBF7AC826E073.png>

Electronic Part

unread,
Jan 6, 2020, 12:47:48 AM1/6/20
to kivy-...@googlegroups.com
Again i got the same thing. I changed the config. how get back to the original kivy config

Electronic Part

unread,
Jan 6, 2020, 2:07:46 AM1/6/20
to kivy-...@googlegroups.com
Please just tell me how back to original kivy windows size

Elliot Garbus

unread,
Jan 6, 2020, 9:07:47 AM1/6/20
to kivy-...@googlegroups.com

To go back to to the original config:

 

Config.set('graphics', 'window_state', 'visible')
Config.write()

Or delete the config.ini file.

https://kivy.org/doc/stable/guide/config.html#configure-kivy

Elliot Garbus

unread,
Jan 6, 2020, 3:28:52 PM1/6/20
to Kivy users support
Here is a quick example.  This creates a fullscreen window, pressing the button alternates between fullscreen and a 600 x 600 window.


from kivy.config import Config
Config.set('graphics', 'window_state', 'maximized')

from kivy.app import App
from kivy.lang import Builder
from kivy.core.window import Window, WindowBase

kv = """
BoxLayout:
orientation: 'vertical'
Label:
text:'Change Window Size Test'
Button:
text: 'Change Size'
on_release: app.change_window_size()
"""


class FullScreenApp(App):
fullsize = 0

def build(self):
return Builder.load_string(kv)

def on_start(self):
self.fullsize = Window.size

def change_window_size(self):
if self.fullsize == Window.size:
Window.size = (600, 600)
else:
Window.size = self.fullsize


FullScreenApp().run()

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+unsubscribe@googlegroups.com.

Electronic Part

unread,
Jan 7, 2020, 12:37:39 AM1/7/20
to kivy-...@googlegroups.com
I really appreciate your help. Just one more question. When i make screen full size by this command Window.size = (1366, 768), my fullsize window is not at the middle or does not fit the screen as you can see in the image. I got back to original setting by  Config.set('graphics', 'window_state', 'visible') and i used   Window.size = (1366, 768). the window is full size just its position is not true. Any idea how i can fix this? Thanks

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.

 

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/0f882e0e-0e03-46a8-aae0-5008b6a8a8bf%40googlegroups.com.

Electronic Part

unread,
Jan 7, 2020, 12:38:29 AM1/7/20
to kivy-...@googlegroups.com
Here is the screenshot 
image.png

Elliot Garbus

unread,
Jan 7, 2020, 6:46:30 AM1/7/20
to kivy-...@googlegroups.com

To position your full-size window:

 

Window.left = 0

Window.top = 23

 

From: Electronic Part
Sent: Monday, January 6, 2020 10:38 PM
To: kivy-...@googlegroups.com
Subject: Re: [kivy-users] How to make app full screen with border

 

Here is the screenshot 

Electronic Part

unread,
Jan 7, 2020, 6:51:35 AM1/7/20
to kivy-...@googlegroups.com
Thank you so much, I will mark it as completed

Electronic Part

unread,
Jan 8, 2020, 2:01:39 AM1/8/20
to Kivy users support
I have one more problem regarding this question. I don't want to cover lower band. this is what i mean. In one of images i have took, kivy cover lower band and in the other one not because i resize the window manually. Could you tell me how uncover lower band without resizing ?

output1.PNG
output2.PNG

Elliot Garbus

unread,
Jan 8, 2020, 2:32:10 PM1/8/20
to kivy-...@googlegroups.com

Could you tell me how uncover lower band without resizing ?

I’m not sure that I understand your question.  On Windows10 the task bar, has a number of settings.  If the task bar is set to visible, when I go full screen, the taskbar is not covered. 

 

Kivy reports the task bar as 40pixels high.  If you want to uncover the bottom of the screen, reduce the height of the window.

 

I wrote a tool to explore window sizes, and to save and restore the size of the kivy window on exit and start.  This might help.  It provides an interactive view of the window size and position.

https://github.com/ElliotGarbus/KivyWindowSize

 

 

 

From: Electronic Part
Sent: Wednesday, January 8, 2020 12:01 AM
To: Kivy users support
Subject: Re: [kivy-users] How to make app full screen with border

 

I have one more problem regarding this question. I don't want to cover lower band. this is what i mean. In one of images i have took, kivy cover lower band and in the other one not because i resize the window manually. Could you tell me how uncover lower band without resizing ?

 

--

You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.

Electronic Part

unread,
Feb 17, 2020, 5:57:53 AM2/17/20
to kivy-...@googlegroups.com
I faced another issue once i run my app on another system. Once i tried it on another system i got smaller windows (it kept ratio of the old  window. In another words, did not update itself with new screen size )

Electronic Part

unread,
Feb 17, 2020, 6:01:27 AM2/17/20
to kivy-...@googlegroups.com
By the way, the screen size in the old system was
Window.size = (1366, 768)
Just want windows size adapt itself with any screen size

Best Regards

Elliot Garbus

unread,
Feb 17, 2020, 8:28:45 AM2/17/20
to kivy-...@googlegroups.com

I would suggest the following:

  • Set the screen to full size
  • Read the window size
  • Reduce the height of the window by 40 pixels. (to reveal the menu bar)
  • Set the window size

Electronic Part

unread,
Feb 19, 2020, 12:46:24 AM2/19/20
to kivy-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages