Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu border #39

Open
marianlukac opened this issue Apr 8, 2020 · 2 comments
Open

Menu border #39

marianlukac opened this issue Apr 8, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@marianlukac
Copy link

By using the colored text, the menu border is corrupted... (see the attachment)

There is a possibility to "switch off" the menu border?

image

@aegirhall
Copy link
Owner

Currently there isn't a feature to disable the borders entirely. But I'll add that as a feature enhancement.

In the meantime, you can do this as a work-around:

  1. Add a new class that extends MenuBorder, for example:
class EmptyBorderStyle(MenuBorderStyle):
    @property
    def bottom_left_corner(self): return ''

    @property
    def bottom_right_corner(self): return ''

    @property
    def inner_horizontal(self): return ''

    @property
    def inner_vertical(self): return ''

    @property
    def intersection(self): return ''

    @property
    def outer_horizontal(self): return ''

    @property
    def outer_horizontal_inner_down(self): return ''

    @property
    def outer_horizontal_inner_up(self): return ''

    @property
    def outer_vertical(self): return ''

    @property
    def outer_vertical_inner_left(self): return ''

    @property
    def outer_vertical_inner_right(self): return ''

    @property
    def top_left_corner(self): return ''

    @property
    def top_right_corner(self): return ''
  1. Use your new class to set the border type in the menu formatter. For example:
# use EmptyBorderType to "disable" borders until a proper enhancement is added to console-menu
menu_format = MenuFormatBuilder().set_border_style(EmptyBorderStyle())
menu = ConsoleMenu("My Menu", formatter=menu_format)
...

@aegirhall aegirhall added the enhancement New feature or request label Apr 10, 2020
@SuppliedOrange
Copy link

SuppliedOrange commented Jan 8, 2024

Are you using pyinstaller here? It breaks the borders for me too.
There's a pull request that makes an empty border like the one mentioned above here: #97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants