Thread: Scroll Bar

  1. #1
    Registered User unixOZ's Avatar
    Join Date
    Feb 2002

    Red face Scroll Bar

    Im trying to make a program (in C) to display all the information of the elements of the periodic table. My problem comes when the info is too much and doesnt fit in the screen.
    How could i create one? any ideas?? or something that lets the user use ENTER key or up & down arrows to move around the text.
    PD: my program is only for the console, im not using any ncurses or X11 libraries

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Anything other than simple printf (which is just one line after another) is going to involve an awful lot of fiddling about, if you don't use some pre-existing library like ncurses

  3. #3
    Registered User alex's Avatar
    Join Date
    Sep 2001

    You can usually find out about the size of the console by examining the environment variables COLUMNS and LINES (using getenv from stdlib.h) If the environment variables do not exist, you should assume 80 columns and 24 lines. There is no good portable way to get single keystrokes, besides using the curses libraries.

    Hope this helps


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 01:32 PM
  2. Bitmap with a scroll bar
    By SuperNewbie in forum Windows Programming
    Replies: 1
    Last Post: 10-29-2003, 11:36 PM
  3. no horizontal scroll bar?
    By scott27349 in forum C++ Programming
    Replies: 0
    Last Post: 03-16-2002, 10:41 PM
  4. Problem with Scroll Bar
    By Garfield in forum Windows Programming
    Replies: 8
    Last Post: 11-05-2001, 05:34 AM
  5. Problem with Scroll Bar
    By Garfield in forum Windows Programming
    Replies: 3
    Last Post: 11-01-2001, 02:23 PM