Console Text Scrolling Help!!

This is a discussion on Console Text Scrolling Help!! within the C++ Programming forums, part of the General Programming Boards category; Hi Guys Im in the situation where you select a menu option in my program and it then lists about ...

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    34

    Console Text Scrolling Help!!

    Hi Guys

    Im in the situation where you select a menu option in my program and it then lists about 10 items of data, the problem is that it causes the console to scroll because the data cannot fit in one pane of the console, is there a way in which i could make the program prompt the user for a keystroke to scroll to the next page of data if the data is too large for a single pane of the console.

    Thanks

  2. #2
    Ted
    Ted is offline
    Registered User
    Join Date
    Aug 2001
    Posts
    52
    Yes, you write a pause routine using getc, getchar, or kbhit.

  3. #3
    Unregistered
    Guest
    And you can use gettext and puttext to scroll, ie read a rectangular area with gettext and write it in another location with puttext, then write a new line in the end or in the beginning.

  4. #4
    Registered User
    Join Date
    Oct 2001
    Posts
    34
    Yes i know you have to pause the program, but how do i know if its going to scroll the console because it wont fit ?

  5. #5
    Banned frenchfry164's Avatar
    Join Date
    Oct 2001
    Posts
    1,552
    Will you be using a static number of things listed? In that case you can make it pause after you list a certain number of items, then display the rest. You can do this by trial-and-error.

  6. #6
    Registered User Liam Battle's Avatar
    Join Date
    Jan 2002
    Posts
    114
    Well i wrote my own routines for fields and some other cosmetic stuff on a console screen.

    what you want to do is if you have multipul fields (ie. 6 lines of text which can be scrolled past a specified length on the screen) then you need to have current focus on the cursor line, and when it goes to scroll, it exits the function and updates the positioning parameters of each field (ie. all 6 fields). that will properly scroll a set of lines on a screen without problem.

    Ive used it dozens of times and works great... but make sure you are the one controlling the cursor position as well as positioning parameters.


    hope that answers ur quesiton... and helps...
    LB0: * Life once school is done
    LB1: N <- WakeUp;
    LB2: N <- C++_Code;
    LB3: N >= Tired : N <- Sleep;
    LB4: JMP*-3;

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Limiting amount of text shown in console box
    By FingerPrint in forum C++ Programming
    Replies: 15
    Last Post: 03-30-2006, 01:39 AM
  2. Text positioning and Text scrolling
    By RealityFusion in forum C++ Programming
    Replies: 3
    Last Post: 08-13-2004, 01:35 AM
  3. Scrolling Text Boxes
    By minime6696 in forum Windows Programming
    Replies: 1
    Last Post: 11-30-2003, 09:42 AM
  4. How to print Right aligned Text in a console?
    By Aidman in forum C++ Programming
    Replies: 13
    Last Post: 03-09-2003, 10:43 PM
  5. Just one Question?
    By Irish-Slasher in forum C++ Programming
    Replies: 6
    Last Post: 02-12-2002, 10:19 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21