LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

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

Rep: Reputation: 56
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?

-Tristan
 
Old 03-25-2013, 07:23 PM   #2
dickey
Member
 
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.
 
  


Reply


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


All times are GMT -5. The time now is 02:29 PM.

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