Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-24-2013, 06:48 PM   #1
Senior Member
Registered: May 2008
Distribution: Slackware
Posts: 1,033

Rep: Reputation: 69
A question about Ncurses start_color()...

I use item and have set my background to black and foreground to blue. Sometimes when I exit my Ncurses program my foreground changes to white. Is there a function that I can run near the exit of my program to keep the blue?

Old 03-25-2013, 07:23 PM   #2
Registered: Jun 2009
Posts: 43

Rep: Reputation: 18
Well, endwin will reset the colors. You could bypass that by making a substitute for endwin (which is a little complicated): use reset_shell_mode to fix the terminal mode, and tparm/tputs to move the cursor to the lower-left corner as well as sending the rmcup, rmkx terminfo capabilities to get the cursor-keys working again.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] C programming ncurses Input question errigour Programming 1 01-28-2013 04:05 PM
Question about chapter 6.19 ncurses?? adi_30stm Linux From Scratch 3 07-24-2011 10:58 AM
nCurses getch() question alpha_gamma Programming 7 03-07-2007 07:30 PM
how to print text in color by ncurses without opening a ncurses window Greatrebel Programming 0 12-20-2006 09:15 AM
Question about building glibc and ncurses tomdkat Linux - Software 2 02-18-2005 09:59 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:22 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration