09-29-2011
Thanks,
Im guessing there is not way to change the whole screen in one shot. the Code above works line by line, changing the background color of the lines Im working on.
No problem, using this code will work just fine, thanks.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am using a telnet session (VT100) and need to modify my .profile so that it will set the color of the telnet session. I am not using Xterm (ie: can't use .Xdefaults). I am able to change the colors via menu's but need to preset in .profile. Is this possible??? Can't find anything at all on how... (3 Replies)
Discussion started by: dvella
3 Replies
2. UNIX for Dummies Questions & Answers
Ok, so I'm comfortable backgrounding jobs in the shell, starting and stopping them, and bringing them to the fg and bg. What I can't figure out is how to monitor those background jobs from another shell (remote, or local).
Example:
- On a local console for MYHOST, I su to root
- I then update... (3 Replies)
Discussion started by: vikingshelmut
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am new to unix.
How can i change the background color in vi?
Thank you.
-tictactoe (1 Reply)
Discussion started by: tictactoe
1 Replies
4. Shell Programming and Scripting
I have a file as like below,
10:20:30.45 START 10.20.30.40
10:20:31.46 HELLO 10.20.30.40
10:20:32.46 START 10.20.30.41
10:20:33.44 END 10.20.30.40
10:20:35.44 HELLO 10.20.30.41
10:20:36.56 HELLO 10.20.30.41
10:20:37.78 HELLO 10.20.30.41
10:20:38.99 START 10.20.30.40... (1 Reply)
Discussion started by: gobinath
1 Replies
5. Shell Programming and Scripting
Hi All,
how do I set in .profile file Unix terminal background color = BLUE ?
Please advice me.
:confused: (2 Replies)
Discussion started by: raghur77
2 Replies
6. AIX
Hi Everyone:
Is there any way to enable colors through putty for a session into AIX? I've tried to set the TERM variable to xterm-256color but it doesn't work
having a 8-color terminal would be okay for me
thanks in advance (5 Replies)
Discussion started by: edgarvm
5 Replies
7. Shell Programming and Scripting
Hi,
I am trying to write a python program which changes background color on click of button. However i am stuck up. Instead of changing the color currently it is creating a new frame every time.
please look at the code and let me know how to correct it
#!/usr/bin/env python
from Tkinter... (0 Replies)
Discussion started by: vickylife
0 Replies
8. Red Hat
Hi. How do I change the background color and text in Fedora. I did find the set_color -b command.
Thanks (1 Reply)
Discussion started by: Ccccc
1 Replies
9. Programming
I am using uil to build the widgets. I compiled the below code using gcc 3.4.6 compiler. Launched x window in light gray color. How to change the default color of the window?
#include <X11/Xlib.h>
#include <Xm/Xm.h>
#include <Mrm/MrmAppl.h>
void
main ( int argc, char **argv )
{... (1 Reply)
Discussion started by: satish@123
1 Replies
10. UNIX for Dummies Questions & Answers
Hello,
I am using RHEL 6.1 on VMware
I am searching for a way to change background color (not line by line color wich one can using tput command)
basically changing the color of the whole screen to white instead of the default black and changing font color to black and alos would like to... (2 Replies)
Discussion started by: Dexobox
2 Replies
LEARN ABOUT PHP
ncurses_init_pair
NCURSES_INIT_PAIR(3) 1 NCURSES_INIT_PAIR(3)
ncurses_init_pair - Define a color pair
SYNOPSIS
int ncurses_init_pair (int $pair, int $fg, int $bg)
DESCRIPTION
Defines or redefines the given color pair to have the given foreground and background colors. If the color pair was previously initial-
ized, the screen is refreshed and all occurrences of it are changed to reflect the new definition.
Color capabilities must be initialized using ncurses_start_color(3) before calling this function. The first color pair (color pair 0) is
assumed to be white on black by default, but can be changed using ncurses_assume_default_colors(3).
PARAMETERS
o $pair
- The number of the color pair to define.
o $fg
- The foreground color for the color pair. May be one of the pre-defined colors or one defined by ncurses_init_color(3) if the
terminal has color changing capabilities.
o $bg
- The background color for the color pair. May be one of the pre-defined colors or one defined by ncurses_init_color(3) if the
terminal has color changing capabilities.
RETURN VALUES
Returns -1 if the function was successful, and 0 if ncurses or color support were not initialized.
NOTES
Note that color changing capabilities are not required for defining color pairs of pre-existing colors, but only for changing definitions
(red, green, and blue components) of colors themselves per ncurses_init_color(3).
EXAMPLES
Example #1
Writing a string with a specified color to the screen
<?php
ncurses_init();
// If the terminal supports colors, initialize and set active color
if (ncurses_has_colors()) {
ncurses_start_color();
ncurses_init_pair(1, NCURSES_COLOR_YELLOW, NCURSES_COLOR_BLUE);
ncurses_color_set(1);
}
// Write a string at specified location
ncurses_mvaddstr(10, 10, "Hello world! Yellow on blue text!");
// Flush output to screen
ncurses_refresh();
ncurses_end();
?>
SEE ALSO
ncurses_pair_content(3), ncurses_start_color(3).
PHP Documentation Group NCURSES_INIT_PAIR(3)