[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

407.0. "Window color setup" by CIMAI::SHAMEL (Marsha Shamel) Wed Mar 15 1989 14:18

First, let me set the stage:  You are dealing with a novice at DECwindows.  I am
a user, not a programmer.

System is a VS II/GPX, 10MB memory, a disk (hows that for detail!).  I am a
member of a mixed interconnect cluster, booting from the cluster with local
storage and swapping.  VMS 5.1, DECwindows V?.

I have spend the last hour foing through this file, trying to find an answer to
my problem.  If it is here, it is not in terms I can understand.

I want to change the color of the foreground and background of my window
displays.  

In the session manager, I selected customize window, picked out the colors,
applied them, OKd them.  Then created a new window.  NOTHING was different.

I can change the background color and pattern but not the window.  What steps
have I missed?

(NOTE: As I am a mixed interconnect, I have no access to the system managers
account )

Thanks, and again, I fall on my sword if this is covered elsewhere!

                                

T.RTitleUserPersonal
Name
DateLines
407.1STAR::MFOLEYRebel without a ClueWed Mar 15 1989 14:3725
	What I do is start up my DECterms with CHILD, passing a SETUP file.
	This works very well for me.. Using VWSLAT I can also pass the
	CONNECT/SETUP=filename command and have different setups for
	LAT windows.  Example code follows:

							mike
	EXample:

Child Command:
$  CHILD/image=sys$system:loginout.exe/detach/nopass/pause=5 -
        /SHRINK/ITITLE="1"/TITLE="DECterm 1" -
        /x=210/y=240/page=30/nobroad/insert/setup=[foley.decw]decterm1_setup.dat
$!

DECterm1_setup.dat


DECW$TERMINAL.main.terminal.condensedFont:      on
DECW$TERMINAL.main.terminal.adjustFontSizes:    off
DECW$TERMINAL.main.terminal.fontSetSelection:   0
*foreground:                                    Salmon
*background:                                    white
DECW$TERMINAL*Slider:                           Goldenrod

407.2MU::PORTERwaiting for BaudotWed Mar 15 1989 16:3912
re .1 -- all that CHILD stuff might be a bit much for a novice, Mike!


re .0 -- the catch is that you have to start a new session.  so:

	i.   change colours as required, and OK them
	ii.  select the "save setup" option from the session manager
	iii. "quit" the session
	iv.  login again

	presto, new colours!

407.3STAR::MFOLEYRebel without a ClueWed Mar 15 1989 23:3911
       
       
       RE: .2
       
       	I didn't think it was THAT difficult! :-) :-) I mean, it ONLY took
       reading this notesfile for the past 6 months to dig out all the
       particulars.. :-) :-)   Seriously, if it's looked at with another
       window in HELP reading the CHILD help library, it's not that bad.
       
       						mike

407.4got it!CIMAI::SHAMELMarsha ShamelFri Mar 17 1989 08:3512
Thank you both.  

I now have it figured out.  The hard way - changing the colors, quitting the
session, restarting everything.  Gee, this is fun!

It used to be so easy on my VAXstation, try a new set of colors and it happened
immediately - I could do a lot of testing to get the combination I wanted.

But I guess this is progress!

Again, thanks for the help.

407.5STAR::THOMASBen ThomasFri Mar 17 1989 09:4471
    I don't usually post my hacks, but I'll insert my window color changer
    below.  I use it to get a new color for every new DECterm window.  Note
    that it needs time to execute, so it won't work if you start up >1
    window at login time.  I execute this from LOGIN.COM.
    
$! DW_COLORS.COM
$!
$!	B. Thomas
$!
$!	This is a hack to cycle through colors used to create DECterm terminals.
$!	The assumption is that you have a DECW$TERMINAL_DEFAULT.DAT that
$!	includes the following 2 lines:
$!
$!		DECW$TERMINAL.main.terminal.Background:	color
$!		DECW$TERMINAL.main.terminal.Foreground:	color
$!
$!	2 caveats: 	1) This isn't a supported way to change colors
$!			2) This DCL could be improved.  If you don't like it
$!				then change it.
$
$! List of user color preferences
$
$	Back_Colors	= "Thistle,Palegreen,	Blue, Orchid,VioletRed,Tan,  Maroon,Darkturquoise,Mediumslateblu
$	Fore_Colors	= "Black  ,Black,	White,Black, Black,    Black,White ,Black        ,Black"
$
$	Open/Read/Share	FOO	DECW$TERMINAL_DEFAULT.DAT
$	Open/Write	NEWFOO	DECW$TERMINAL_DEFAULT.DAT
$
$! Read each line in file
$
$Line_Loop:
$	Read/End=EOF FOO LINE
$	If F$Locate("DECW$TERMINAL.main.terminal.Foreground:",Line) .NES. F$Length(Line) Then Goto Line_Lo
$	If F$Locate("DECW$TERMINAL.main.terminal.Background:",Line) .EQS. F$Length(Line) Then Goto Write_I
$
$!	Found line we're looking for
$
$	Current_Color	= F$Edit(F$Element(1,":",Line),"TRIM")
$
$! Find index of current color
$
$	I	= 0
$Color_Loop:
$	Test_Color	= F$Edit(F$Element(I,",",Back_Colors),"TRIM")
$	If (Test_Color .EQS. ",") Then Goto No_Color_Match
$	If (Current_Color .EQS. Test_Color) Then Goto Found_Color
$	I	= I + 1
$	Goto Color_Loop
$
$No_Color_Match:
$	I	= -1
$
$Found_Color:
$	New_Back	= F$Edit(F$Element(I+1,",",Back_Colors),"TRIM")
$	If (New_Back .EQS. ",") Then Goto No_Color_Match		! At end, use first item
$	New_Fore	= F$Edit(F$Element(I+1,",",Fore_Colors),"TRIM")
$	Write Newfoo "DECW$TERMINAL.main.terminal.Background:	''New_Back'"
$	Write Newfoo "DECW$TERMINAL.main.terminal.Foreground:	''New_Fore'"
$	Goto Line_Loop
$
$Write_It:
$	Write Newfoo Line
$	Goto Line_Loop
$
$EOF:
$	Close Foo
$	Close Newfoo
$	Purge/Nolog	DECW$TERMINAL_DEFAULT.DAT
$	Exit
    

407.6XCOLORSCOOKIE::KITTELLRichard S. Kittell - Database SysMon Mar 20 1989 09:575
	There's a program in ELKTRA::DW_EXAMPLES, note 105 that
	will let you interactively try various combinations of
	colors for the background and foreground.

407.7bug???FLUME::griffinWed Mar 29 1989 12:245
Could this be a bug in the VMS implementation.

On ULTRIX, after selecting the new colors, OKing and saving, all new windows
created use the new settings.  This is the expected behaviour.

407.8light on dark == black on white?TLE::DANIELSBrad Daniels, VAX C RTL whipping boyThu Mar 30 1989 12:3825
I got  bitten  by  this  problem  when  I  first  got started... I wanted my
terminal  windows  to be white on black, so, not realizing that there was an
option  in DECterm to handle this, I set my default background to black, and
my default foreground to white.  Nothing happened.

I started  up  a  terminal  window  anyway,  and sure enough, it was whit on
black.  I  looked in the customization, and saw that the box for light text,
dark background was on, and realized that I didn't need to mess with default
foreground/background  colors,  so  I  set  the  colors  back  to the system
defaults.  I  logged  out,  and  when I logged back in, I discovered that my
terminal  windows  were  black  on white. I checked the setup. It still said
"light text, dark background"...  Then I figured out what had happened.

When I  reset  the  defaults, that worked for the terminal windows I created
right  afterwards,  so I saw what I was expecting. However, when I reset the
colors,  I  got  what DECterm does, which is to use the foreground color for
text  and  the  background  color  for the background when "light text, dark
background" is selected. That made the option highly misleading, because the
default  foreground  color  is black (which I would tend to call "dark") and
the default background color is white (which I tend to think is "light")...

This all seems to have been unnecessarily confusing and frustrating...

- Brad

407.9HANNAH::MESSENGERBob MessengerThu Mar 30 1989 13:2114
Re: .8

What DECterm *tries* to do is to look at the foreground and background and
decide which is darker. This doesn't work in all cases (I'd QAR it).

Re .7

One reason the VMS and Ultrix versions of DECterm might behave differently
is because on VMS there is one DECterm controller process that controls all
there DECterm windows on the same workstation, while on Ultrix there is one
controller process per window.

				-- Bob

407.10Not intuitive, should be explained to userOSLACT::OLAVDo it in parallel!Thu Mar 30 1989 16:008
All user's seem to think that it is a bug that you have to quit the session
an start from scratch to get the new colors. Why can't all the windows be
updated to the new colors? To many windows to traverse? Not possible to change
colors after they are created? If there is a good reason for it, please put
up a message box explaing it to the user!

Olav

407.11DunnoHANNAH::MESSENGERBob MessengerThu Mar 30 1989 22:0510
Re: .10

Why do you have to restart the DECterm controller for the new colors to
take effect?  I don't know; I think it's a bug.  It seems to me that DECterm
should pick up the resource file automatically when it creates a new window,
so something must not be set up right.  Any comments from the Session Manager
people?

				-- Bob

407.12Fast, different colors for each window!STAR::GRIFFINFri Mar 31 1989 09:5320
    
    	I found a neat way to have different colors for each window. I do
    not know if it is supported but it works. All I did was VT240
    PROGRAMMER REFERENCE MANUAL found the section that dealt with colors
    (page 143 I believe) put the color definition I wanted into a file with 
    the appropriate escape sequence and presto new color immediatly. Note,
    I have only been able to change background colors I have not had the
    time to investigate getting the forground colors to changes.
    
    	This method is fast but you have to create a file with color
    definition in it, so I guess it is expensive (one color per file). If
    anyone finds a better, faster way of doing this please let me know. 
    
    	Example:
    		<ESC>PpS(AM0(AH0L33S0))<ESC>\
    
    	* the escape character is not printable so when you enter the
    	  escape character you will get a "" instead of "<ESC>". 
    	

407.13PRNSYS::LOMICKAJJeff LomickaFri Mar 31 1989 12:163
You can use the /INIT= qualifier on CHILD to do this, if you want.


407.14COLOR.COMLDP::RYANBron-Yr-AurFri Mar 31 1989 12:2012
    	re: 12
    
    	There is a .COM file out (COLOR.COM) that prompts you for
    foreground, background, bold and reversed video colors.  This was
    originally written for a vt 241, but it works on the GPX I use.
    I can only change the background too, however.  If anyone wants a 
    copy you can get a copy @
    
    		XPANES::$DISK@:[RYAN]COLOR.COM
    
    				Tony

407.15oops!LDP::RYANBron-Yr-AurFri Mar 31 1989 12:279
    
    
    .-1 should read '...$DISK2...' instead of '...$DISK@...', forgot to 
    take my finger of the shift key |^)
    
    
    				Tony