Terminal size

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2007
Posts: 2
Reputation: Renjith VR is an unknown quantity at this point 
Solved Threads: 0
Renjith VR Renjith VR is offline Offline
Newbie Poster

Terminal size

 
0
  #1
Sep 21st, 2007
Can we fix the terminal(console) size according to data displayed?
I am working in c++,and my O.S is kubuntu.Using c++ i can align the data displayed in cosole,
but before i want to change the terminal to a particular size.otherwise it is not aligned the data.
Any way to change the size of terminal according to the data dispalyed? If anybody knows about this .please reply me soon..
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,571
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1485
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Terminal size

 
0
  #2
Sep 21st, 2007
Instead of attempting to change the size of the terminal (not sure that is even possible) figure out how to align the data correctly. That will probably require knowledge of and use of terminfo information because every terminal may be different.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 2
Reputation: Renjith VR is an unknown quantity at this point 
Solved Threads: 0
Renjith VR Renjith VR is offline Offline
Newbie Poster

Re: Terminal size

 
0
  #3
Sep 21st, 2007
hai,
thanks for ur reply,
i just wrote a prgram in c++ that will aligh the output.ie In one line only 80 characters were displayed.If it exceeds ,next character will start from next line.Also words cannot broken in middle.But if the terminal is minimize or small(default) then it will not alighn data accordingly.So any way to adjust this terminal or anyway to keep the terminal size big?

i expect ur reply soon
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,571
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1485
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Terminal size

 
0
  #4
Sep 21st, 2007
You can use curses library to get standard format (I think). It's been many years since I programmed for *nix so I probably won't be much more help.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 7,802
Reputation: Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute Narue has a reputation beyond repute 
Solved Threads: 747
Team Colleague
Narue's Avatar
Narue Narue is offline Offline
Code Goddess

Re: Terminal size

 
0
  #5
Sep 21st, 2007
>So any way to adjust this terminal or anyway to keep the terminal size big?
That's poor design. Your program's output should conform to the environment, not the other way around. There are ways to find out the size of the console, and you can use those rather than hard coding a size or trying to force a size on the user.
I'm here to prove you wrong.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC