[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

curses to draw a box

Posted on 2004-10-31
6
Medium Priority
?
279 Views
Last Modified: 2013-12-27
hi experts,

i am trying to draw a closed thick box. however the use of characters like hypens, pipes, or underscore cannot give me a closed thick box.

how?
0
Comment
Question by:sonic2000
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12457339
Hi,

    You mean draw a thick box in a text editor like vi?
How about use "#" instead?

Wesly
0
 

Author Comment

by:sonic2000
ID: 12459400
i need a thick closed border box.
anyway what does it got to do with the text editor i am using? anyway i am using vim.
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12459683
Hi,
 
   vim is advanced version of vi.

   However, with text editor, which deals with ASCII code, it's hard to draw a closed box.
However, you can use "+" at each corner of the box.

Wesly
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:sonic2000
ID: 12460719
i read about ACS_BLOCK.
How to use all those color constants and drawings?
doesn't seem to work.
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12460773
Hi,

   ACS_BLOCK is a parameter for programming fuctions which are defined in ocurses.h.
It's not for plain text file.

Wesly
0
 
LVL 12

Accepted Solution

by:
stefan73 earned 200 total points
ID: 12471143
Hi sonic2000,
If you have a colour display, you can use VT220 colour codes (or invert mode for monochrome) to exchange foreground and background colours:

Colour swapping:
"\x1b[30;47m"

Inverse: "\x1b[7m"

Reset to normal: "\x1b[0m"

See also http://rtfm.etla.org/xterm/ctlseq.html

Cheers!

Stefan
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question