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

How to set box exact height and width? #427

Open
lucentminds opened this issue Dec 14, 2022 · 1 comment
Open

How to set box exact height and width? #427

lucentminds opened this issue Dec 14, 2022 · 1 comment

Comments

@lucentminds
Copy link

const screen = blessed.screen();

screen.append(blessed.box({
   label: 'test 1',
   border: {
      type: 'line',
   },
   top: 0,
   left: 0,
   width: 10,
   height: 10,
}));

screen.render();

If I run this example script I get a rectangle that is taller than it is wide. How do I set the exact width and height of the box so that it's a square?

@tracker1
Copy link

Change your font where each character is the same width as height... This is a terminal library, your size is going to be based on base level character size for your terminal characters... it's not a pixel based drawing library per se.

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

No branches or pull requests

2 participants