Type wont change color!
ive done 3 new docs, restarted... i dont get why i cant
change my color or type in CSS?! its driving me crazy!
Beats me. From time to time I lack the interest &
temerity to ask questions
like that. ;-)
Walt
"Murray *ACE*" <[email protected]> wrote
in message
news:ghk2kl$sb4$[email protected]..
> Why the absolute positioning?
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
> ==================
>
>
> "Walt F. Schaefer" <[email protected]> wrote
in message
> news:ghk2j5$s9n$[email protected]..
>> Remove this:
>> clip: rect(0px,0px,0px,0px);
>> --
>>
>> Walt
>>
>>
>> "danbenner" <[email protected]>
wrote in message
>> news:ghk194$qq3$[email protected]..
>>> ive done 3 new docs, restarted... i dont get why
i cant change my color
>>> or type
>>> in CSS?! its driving me crazy!
>>>
>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
>>> "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>> <html xmlns="
http://www.w3.org/1999/xhtml">
>>> <head>
>>> <meta http-equiv="Content-Type"
content="text/html; charset=UTF-8" />
>>> <title>Untitled Document</title>
>>> <style type="text/css">
>>> <!--
>>> body {
>>> background-color: #000000;
>>> background-image: url(/art/background.jpg);
>>> }
>>> #nav {
>>> float: none;
>>> height: 100px;
>>> width: 449px;
>>> margin: 0px;
>>> clip: rect(0px,0px,0px,0px);
>>> right: 73px;
>>> position: absolute;
>>> top: 16px;
>>> font-family: Arial, Helvetica, sans-serif;
>>> color: #FFFFFF;
>>> }
>>> #wrapper {
>>> width: 980px;
>>> margin-top: 0px;
>>> margin-right: auto;
>>> margin-bottom: 0px;
>>> margin-left: auto;
>>> height: 700px;
>>> }
>>> -->
>>> </style>
>>> </head>
>>>
>>> <body>
>>> <div id="wrapper">
>>>
>>>
>>> <div id="nav">test test test</div>
>>>
>>>
>>> </div>
>>>
>>>
>>> </body>
>>> </html>
>>>
>>
>>
>
Similar Messages
-
JTree CellRenderer wont change colors
Hi
I am using a custom CellRenderer that extends DefaultTreeCellRenderer for showing a dataobject as a label. The problem I am facing is that in my getTreeCellRendererComponent method I try to set the foreground and background colors of the text, but it wont swap.
Here is what I tried:
setForeground(selected ? getTextSelectionColor() : getTextNonSelectionColor());
setBackground(selected ? backgroundSelectionColor : backgroundNonSelectionColor);
The problem is that it wont change no matter what. Any ideas?
My whole code looks like this:
import java.awt.*;
import javax.swing.*;
import javax.swing.tree.*;
public class CategoryRenderer extends DefaultTreeCellRenderer implements TreeCellRenderer
public CategoryRenderer()
setOpaque(true);
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
setForeground(/*selected ? getTextSelectionColor() : getTextNonSelectionColor()*/Color.WHITE);
setBackground(/*selected ? backgroundSelectionColor : backgroundNonSelectionColor*/Color.BLACK);
TCategory cat = (TCategory)value;
setText(cat.getName());
return this;
}Hi
I am using a custom CellRenderer that extends
DefaultTreeCellRenderer for showing a dataobject as a
label. The problem I am facing is that in my
getTreeCellRendererComponent method I try to set the
foreground and background colors of the text, but it
wont swap.Is there a reason you want to handle this yourself instead of letting the superclass do it for you? Unless you want non-standard selection colors, you would simply do this:
public Component getTreeCellRendererComponent(
JTree tree,
Object value,
boolean selected,
boolean expanded,
boolean leaf,
int row,
boolean hasFocus)
super.getTreeCellRenderedComponent(tree, value, selected, expanded, leaf, row, hasFocus);
TCategory cat = (TCategory)value;
setText(cat.getName());
return this;
}This will also handle painting the focus and other issues.
Jim S. -
I have PSE12. I have created a watermark 3 months ago with no issue. I am now unable to change the color. The watermark will not show up regardless of background color. I cannot change the color at all. I have even deleted the one I created and made another. This didn't correct the issue wither. I cant even get the watermark to be black? Please help
Beats me. From time to time I lack the interest &
temerity to ask questions
like that. ;-)
Walt
"Murray *ACE*" <[email protected]> wrote
in message
news:ghk2kl$sb4$[email protected]..
> Why the absolute positioning?
>
> --
> Murray --- ICQ 71997575
> Adobe Community Expert
> (If you *MUST* email me, don't LAUGH when you do so!)
> ==================
>
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
>
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
> ==================
>
>
> "Walt F. Schaefer" <[email protected]> wrote
in message
> news:ghk2j5$s9n$[email protected]..
>> Remove this:
>> clip: rect(0px,0px,0px,0px);
>> --
>>
>> Walt
>>
>>
>> "danbenner" <[email protected]>
wrote in message
>> news:ghk194$qq3$[email protected]..
>>> ive done 3 new docs, restarted... i dont get why
i cant change my color
>>> or type
>>> in CSS?! its driving me crazy!
>>>
>>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"
>>> "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>> <html xmlns="
http://www.w3.org/1999/xhtml">
>>> <head>
>>> <meta http-equiv="Content-Type"
content="text/html; charset=UTF-8" />
>>> <title>Untitled Document</title>
>>> <style type="text/css">
>>> <!--
>>> body {
>>> background-color: #000000;
>>> background-image: url(/art/background.jpg);
>>> }
>>> #nav {
>>> float: none;
>>> height: 100px;
>>> width: 449px;
>>> margin: 0px;
>>> clip: rect(0px,0px,0px,0px);
>>> right: 73px;
>>> position: absolute;
>>> top: 16px;
>>> font-family: Arial, Helvetica, sans-serif;
>>> color: #FFFFFF;
>>> }
>>> #wrapper {
>>> width: 980px;
>>> margin-top: 0px;
>>> margin-right: auto;
>>> margin-bottom: 0px;
>>> margin-left: auto;
>>> height: 700px;
>>> }
>>> -->
>>> </style>
>>> </head>
>>>
>>> <body>
>>> <div id="wrapper">
>>>
>>>
>>> <div id="nav">test test test</div>
>>>
>>>
>>> </div>
>>>
>>>
>>> </body>
>>> </html>
>>>
>>
>>
> -
Type and Group color doesn't change.
I'm having a problem with Adobe Illustrator CC 17.1.0 with colors, types and groups.
If I select a text or a group and try to change its color, the Fill color stays correct a the panel, but the text or the group maintains the old color, like the screenshot below.
The only way to change color its is selecting all text characters or all group's elements.Here they are.
Thanks for trying to help! -
Pacman now needs to change color, but the types are incompatible ...
Hi, my book sucks and I need your help again , Thanks In Advance !!!
OK, now pacman can move in all directions and make a random move, but there needs to be a button to make him change color...
I have come up with the following code but when I try to compile I get incompatible types for my new Pacmancolors...
package pacman;
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class Autopacman extends Applet implements ActionListener
boolean Packleur1;
boolean Packleur2;
boolean Packleur3;
boolean Packleur4;
boolean Packleur5;
boolean Packleur6;
int klikken = 1;
int x = 200, y = 200; //beginpositie pacman
int width = 50, height = 50; //formaat pacman
int stap = 20; //standaard stapgrootte
int stapVerander = 10; //stapgrootte wijziging
int angleA = 5; //beginhoeken pacman
int angleB = 345;
public void init(){
Button links = new Button("links"); //knoppen worden gemaakt en gelabeld
Button rechts = new Button("rechts");
Button omhoog = new Button("omhoog");
Button omlaag = new Button("omlaag");
Button harder = new Button("harder");
Button zachter = new Button("zachter");
Button random = new Button("Random actie");
Button kleur = new Button("Kleur veranderen");
links.addActionListener(this); //action events worden aan knoppen gekoppeld
rechts.addActionListener(this);
omhoog.addActionListener(this);
omlaag.addActionListener(this);
harder.addActionListener(this);
zachter.addActionListener(this);
random.addActionListener(this);
kleur.addActionListener(this);
add( links ); //knoppen worden op canvas gezet
add( rechts );
add( omhoog );
add( omlaag );
add( harder );
add( zachter );
add( random );
add( kleur );
public void paint(Graphics g){
g.setColor( Color.black);
g.drawLine( 0, 34, 600, 34 );
Packleur1 = g.setColor( Color.yellow );
Packleur2 = g.setColor( Color.red );
Packleur3 = g.setColor( Color.blue );
Packleur4 = g.setColor( Color.green );
Packleur5 = g.setColor( Color.white );
Packleur6 = g.setColor( Color.black );
g.fillArc(x, y, width, height, angleA, angleB); //teken de pacman voor het eerst
public void actionPerformed(ActionEvent e){
String str = e.getActionCommand();
if( str.equals("Kleur veranderen")){
klikken++;
if( klikken = 2 )
{Packleur2 = true;}
if( klikken = 3 )
{Packleur3 = true;}
if( klikken = 4 )
{Packleur4 = true;}
if( klikken = 5 )
{Packleur5 = true;}
if( klikken = 6 )
{Packleur6 = true;}
return false;
if(klikken == 7)
{klikken = 1;}
if( str.equals("Random actie") ){ //Die stomme random functie
int i = (int)(Math.random() * 10);
switch(i){
case 1: case 7 : str = "omlaag"; break;
case 2: case 8 : str = "omhoog"; break;
case 3: case 9 : str = "links"; break;
case 4: case 10 : str = "rechts"; break;
case 5: case 0: str = "harder"; break;
case 6: str = "zachter"; break;}
if( str.equals("harder") ){ stap = stap + stapVerander;} //stap wordt 10 groter
if( str.equals("zachter") ){ stap = stap - stapVerander;} //stap wordt 10 kleiner
if( stap < 0){stap = 1;} //Stapgrootte wordt nooit negatief of nul
if( str.equals("links") ){ x -= stap; //linksknop laat pacman links kijken en bewegen
angleA = 185;
angleB = 345;}
if( str.equals("rechts") ){ x += stap; //rechtsknop laat pacman rechts kijken en bewegen
angleA = 5;
angleB = 345;}
if( str.equals("omhoog") ){ y -= stap; //omhoogknop laat pacman omhoog kijken en bewegen
angleA = 95;
angleB = 345;}
if( str.equals("omlaag") ){ y += stap; //omlaagknop laat pacman omlaag kijken en bewegen
angleA = 275;
angleB = 345;}
if( x <= 0){ x = 0;} // houdt de pacman tegen als hij links/rechts wil verdwijnen
if( x > 550){ x = 550;}
if( y <= 35){ y = 35;} // houdt de pacman tegen als hij boven/onder wil verdwijnen
if( y > 550){ y = 550;}
repaint(); // zet de pacman opnieuw op het canvas
Can anyone help me with this?
Thanks a bundle!
Menno.Thanks a lot!
Say if you want to see how it works just compile this source :
/* Autopacman spelletje
Menno Hagens, I108
2001
Autopacman.
Maak via overerving van de klasse Packman uit week 4 een nieuwe klasse 'AutoPackman'.
Deze klasse moet de volgende extra functionaliteit bevatten.
De kleur van de Packman moet kunnen worden ingesteld.
Er moet een methode komen die een willekeurige opdracht aan de Packman geeft.
(naarLinks, naarRechts, gaSneller, gaTrager, etc.)
Maak vervolgens een applet met vier Packmannetjes en ��n knop 'Beweeg'.
Als je op deze knop drukt, moeten alle Packmannetjes ��n stap in een willekeurige
richting doen.
Programmeer dit efficient met arrays en loops.
Als je na afloop nog moed hebt kun je de klasse en de applet zo aanpassen dat een
spel ontstaat, waarbij een Packman die op de positie van een andere komt, de andere
Packman opeet. Degene die overblijft heeft gewonnen.
package pacman;
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class Autopacman extends Applet implements ActionListener
boolean Packleur1;
boolean Packleur2;
boolean Packleur3;
boolean Packleur4;
boolean Packleur5;
boolean Packleur6;
int klikken = 1;
int x = 200, y = 200; //beginpositie pacman
int width = 50, height = 50; //formaat pacman
int stap = 20; //standaard stapgrootte
int stapVerander = 10; //stapgrootte wijziging
int angleA = 5; //beginhoeken pacman
int angleB = 345;
public void init(){
Button links = new Button("links"); //knoppen worden gemaakt en gelabeld
Button rechts = new Button("rechts");
Button omhoog = new Button("omhoog");
Button omlaag = new Button("omlaag");
Button harder = new Button("harder");
Button zachter = new Button("zachter");
Button random = new Button("Random actie");
Button kleur = new Button("Kleur veranderen");
links.addActionListener(this); //action events worden aan knoppen gekoppeld
rechts.addActionListener(this);
omhoog.addActionListener(this);
omlaag.addActionListener(this);
harder.addActionListener(this);
zachter.addActionListener(this);
random.addActionListener(this);
kleur.addActionListener(this);
add( links ); //knoppen worden op canvas gezet
add( rechts );
add( omhoog );
add( omlaag );
add( harder );
add( zachter );
add( random );
add( kleur );
public void paint(Graphics g){
g.setColor( Color.black);
g.drawLine( 0, 34, 600, 34 );
g.setColor( Color.yellow);
if( klikken == 1 )
{g.setColor(Color.yellow);}
if( klikken == 2 )
{g.setColor(Color.red);}
if( klikken == 3 )
{g.setColor(Color.blue);}
if( klikken == 4 )
{g.setColor(Color.black);}
if( klikken == 5 )
{g.setColor(Color.green);}
if( klikken == 6 )
{g.setColor(Color.white);}
g.fillArc(x, y, width, height, angleA, angleB); //teken de pacman voor het eerst
public void actionPerformed(ActionEvent e){
String str = e.getActionCommand();
if( str.equals("Kleur veranderen")){klikken++;}
if(klikken == 7)
{klikken = 1;}
if( str.equals("Random actie") ){ //Die stomme random functie
int i = (int)(Math.random() * 17);
switch(i){
case 1: case 7 : case 11: case 15 : str = "omlaag"; break;
case 2: case 8 : case 12: case 16 : str = "omhoog"; break;
case 3: case 9 : case 13: case 17 : str = "links"; break;
case 4: case 10 : case 14: case 0 :str = "rechts"; break;
case 5: str = "harder"; break;
case 6: str = "zachter"; break;}
if( str.equals("harder") ){ stap = stap + stapVerander;} //stap wordt 10 groter
if( str.equals("zachter") ){ stap = stap - stapVerander;} //stap wordt 10 kleiner
if( stap < 0){stap = 1;} //Stapgrootte wordt nooit negatief of nul
if( str.equals("links") ){ x -= stap; //linksknop laat pacman links kijken en bewegen
angleA = 185;
angleB = 345;}
if( str.equals("rechts") ){ x += stap; //rechtsknop laat pacman rechts kijken en bewegen
angleA = 5;
angleB = 345;}
if( str.equals("omhoog") ){ y -= stap; //omhoogknop laat pacman omhoog kijken en bewegen
angleA = 95;
angleB = 345;}
if( str.equals("omlaag") ){ y += stap; //omlaagknop laat pacman omlaag kijken en bewegen
angleA = 275;
angleB = 345;}
if( x <= 0){ x = 0;} // houdt de pacman tegen als hij links/rechts wil verdwijnen
if( x > 550){ x = 550;}
if( y <= 35){ y = 35;} // houdt de pacman tegen als hij boven/onder wil verdwijnen
if( y > 550){ y = 550;}
repaint(); // zet de pacman opnieuw op het canvas -
Making type change color on rollover: Cant make it work
Incredibly, I can not figure out how to make hyperlinked text change color on rollover.
I thought it was a matter of assigning a new CSS rule, but I cant find the dialog box within which to specify a rollover color.
I cant believe how difficult and obtuse such a super simple and basic function is in Dreamweaver.
WHAT am I doing wrong?CSS Pseudo-classes work best if defined in the following order (LiVHA):
a:link {color:#FF0000} /* unvisited link */
a:visited {color:#00FF00} /* visited link */
a:hover {color:#FF00FF} /* mouse over link */
a:active {color:#0000FF} /* selected link */
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
www.alt-web.com/
www.twitter.com/altweb
www.alt-web.blogspot.com -
I cant change color of type in CSS? simple code....
i dont get it. it wont change in css. i tried 3 files and
it's done it before. is something wrong in the code?What program are you pasting from?
Try making the text white first and then copying it, or copying from an application that doesn't allow text formatting. -
My ipod has lines on the screen and will change color. It also is not responding to my touch. What can i do?
Try:
- Reset the iOS device. Nothing will be lost
Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
least ten seconds, until the Apple logo appears.
- Restore from backup. See:
iOS: How to back up
- Restore to factory settings/new iOS device.
If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
Apple Retail Store - Genius Bar -
Change color of future typed text in a pasted document?
How do I change color of future typed text in a copied document? Thanks. My son is doing online home schooling this year and has Study Sheets that he types in his answers. Currently, he highlights his typed text then chooses the color. Is it possible to auto-format this somehow? Thanks!
Pages relies a lot on Styles. Either you can create a paragraph style with a green text colour or just create a character style with a text colour. Here is an image from a document with several character styles in colour.
In the second image I have instead created a Paragraph style with green text colour. This is the only way you can get a template to remember a change of colour as the default is alway black. To create the styles you click on the small triangle to the left of None (for character style) or Body (paragraph style) and choose Redefine style from selection. Save as Template.
More about this can you read in the Pages User Guide downloadable from your Pages Help menu. -
How to change colors in calendars in ios7
I find I can change colors on the Exchange account (gmail) but not the regular gmail account. I do not use iCloud for cals.
In exchange there is an info button (i with a circle around it), this is where colors can be chosen at will.
In gmail there is no way to make this choice.
A problem, since I have several daylong events in a dark color that are obscuring, viz masking, hour long appointments due to the color schemes that cannot apparently be changed.
is this true?
Thx
PS: I've read that exchange has been deprecated as an account type and that "Gmail" is the preferred option for google calendars, etc. Is that true? Will Gmail accounts push notifications the way Exchange did?Precisely the point.
Exchange (run through native Apple Cal.) gives these options.
Gmail (ditto) doesn't.
My understanding is that now the preference is to use Gmail over Exchange, which is no longer supported by google.
I've experienced problems syncing with Exchange but not with Gmail (some calendars do others don't sync in E.)—maybe for this reason, I don't know. I currently combine where needed and possible so that I have the color option, which to me is worth the slight inconvenience of running two different Gmail calendars at the same time.
It sounds like you don't use either just iCloud for syncing calendars, so I may open another thread to ask about this situation. thanks. -
How to change colors in Color Ramps
Hello,
I would like to use Color Ramps, and I need to change colors. In help documents, it say that I juste have to right click in the icon and change what I want. But I tried all option and I can't do anything I want.
Can you help me ??
Thanks
DavidSeems that I'm not the only one to have problems with color ramps...
Nearly everything was explained in the on-line help. Nearly...
"Complete the following steps to change the colors of a color ramp.
1. Right-click the color ramp or a marker and select Marker Spacing»Arbitrary from the shortcut menu to switch the color ramp to arbitrary marker spacing.
2. Use the Operating or Positioning tools to right-click the marker next to the color ramp and select Marker Color from the shortcut menu to change the color associated with a marker.
3. Select the color you want from the color picker that appears."
Additionnal hints :
After switching to arbitrary marker spacing, suppress all intermediate markers (right click> Delete). Then adjust the colors of th
e two remaining end markers. With some ramps, you will be obliged to move slighty the marker position to get a color update.
If you need to insert intermediate colors, add intermediate markers (right click > Add). Using the text tool, type in the exact value associated with the marker. Select the color you want to associate with the marker.
When finished, switch back to uniform marker spacing.
Have fun...
CC
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left... -
HOW TO CHANGE COLOR ON LITTLE SUB TITLE BAR UNDER THE HEADING?
Hi,
I was successfully able to change the background color on the templates headed, but that little bar under it, that displays the links to your other pages within the site did not change with it, and I have tried everything but have not been successful. How do I do this?
Thanks
JenniferThose navbar links are generated by javascript and are not user editable. You can create your own navbar using a Text Based Navbar and then have complete control over font (stick with the Web Safe Fonts), color, size and rollover colors.
Cyclosaurus has posted an HTML snippet that can change the font style of the navbar of each page that the snippet is applied to. You can find it here: http://discussions.apple.com/message.jspa?messageID=8596966#8596966. This page tells how tol change the navbar test to all caps: http://discussions.apple.com/thread.jspa?messageID=8523772#8523772.
And the following code, again courtesy of Cyclosaurus will change the rollover color of the navbar on any page the snippet is added to:
HTML Widget to change rollover color for this page in the navbar above to orange The code used, courtesy of Cyclosurus, is:
<script type='text/javascript'>
styleCSS = 'div#widget0 li a:hover{color: orange;}'; // change color to your liking;
eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[func tion(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'e(c)'\\b','g'),k[c]);return p}('1=2.3.5(\'6\');1.4.7=\'8/9\';1.4(\'a\',\'b\');1.c=d;2.3.e(\'f\')[0].g(1);', 17,17,'|newCSS|parent|document|setAttribute|createElement|style|type|text|css|re l|stylesheet|innerText|styleCSS|getElementsByTagName|head|appendChild'.split('|' ),0,{})); </script>
You can see an example of that in this demo page: Misc. Items.
OT -
How to Change color on control break fields
I have created a master detail report. I then did a control bread on the three fields below. I would like to change the color of the break to blue instead of the standard black. What settings or method would I use to change the color on the control break line to blue? TY.
Request Seq No : 1, Employeee Name : Steve , Supervisor Name : Alex
JohnThose navbar links are generated by javascript and are not user editable. You can create your own navbar using a Text Based Navbar and then have complete control over font (stick with the Web Safe Fonts), color, size and rollover colors.
Cyclosaurus has posted an HTML snippet that can change the font style of the navbar of each page that the snippet is applied to. You can find it here: http://discussions.apple.com/message.jspa?messageID=8596966#8596966. This page tells how tol change the navbar test to all caps: http://discussions.apple.com/thread.jspa?messageID=8523772#8523772.
And the following code, again courtesy of Cyclosaurus will change the rollover color of the navbar on any page the snippet is added to:
HTML Widget to change rollover color for this page in the navbar above to orange The code used, courtesy of Cyclosurus, is:
<script type='text/javascript'>
styleCSS = 'div#widget0 li a:hover{color: orange;}'; // change color to your liking;
eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[func tion(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'e(c)'\\b','g'),k[c]);return p}('1=2.3.5(\'6\');1.4.7=\'8/9\';1.4(\'a\',\'b\');1.c=d;2.3.e(\'f\')[0].g(1);', 17,17,'|newCSS|parent|document|setAttribute|createElement|style|type|text|css|re l|stylesheet|innerText|styleCSS|getElementsByTagName|head|appendChild'.split('|' ),0,{})); </script>
You can see an example of that in this demo page: Misc. Items.
OT -
how do change color of a column in ALV.
Hi
The below abap program shows how to change the colour of individual ALV cells /fields. Only a small number of changes are required from a basic ALV grid which include adding a new field to ALV data declaration table(it_ekko), populating this field with the field name identifier and colour attributes and finally adding an entry to layout control work area. These changes are highlighted in bold below.
REPORT zdemo_alvgrid .
REPORT ZALV_CELLCOLOR.
TABLES: ekko.
type-pools: slis. "ALV Declarations
*Data Declaration
TYPES: BEGIN OF t_ekko,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
statu TYPE ekpo-statu,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
menge TYPE ekpo-menge,
meins TYPE ekpo-meins,
netpr TYPE ekpo-netpr,
peinh TYPE ekpo-peinh,
CELLCOLOR TYPE LVC_T_SCOL,
END OF t_ekko.
DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
wa_ekko TYPE t_ekko.
*ALV data declarations
data: fieldcatalog type slis_t_fieldcat_alv with header line,
gd_tab_group type slis_t_sp_group_alv,
gd_layout type slis_layout_alv,
gd_repid like sy-repid,
gt_events type slis_t_event,
gd_prntparams type slis_print_alv.
*Start-of-selection.
START-OF-SELECTION.
perform data_retrieval.
perform build_fieldcatalog.
perform build_layout.
perform set_cell_colours.
perform display_alv_report.
*& Form BUILD_FIELDCATALOG
Build Fieldcatalog for ALV Report
form build_fieldcatalog.
There are a number of ways to create a fieldcat.
For the purpose of this example i will build the fieldcatalog manualy
by populating the internal table fields individually and then
appending the rows. This method can be the most time consuming but can
also allow you more control of the final product.
Beware though, you need to ensure that all fields required are
populated. When using some of functionality available via ALV, such as
total. You may need to provide more information than if you were
simply displaying the result
I.e. Field type may be required in-order for
the 'TOTAL' function to work.
fieldcatalog-fieldname = 'EBELN'.
fieldcatalog-seltext_m = 'Purchase Order'.
fieldcatalog-col_pos = 0.
fieldcatalog-outputlen = 10.
fieldcatalog-emphasize = 'X'.
fieldcatalog-key = 'X'.
fieldcatalog-do_sum = 'X'.
fieldcatalog-no_zero = 'X'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'EBELP'.
fieldcatalog-seltext_m = 'PO Item'.
fieldcatalog-col_pos = 1.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'STATU'.
fieldcatalog-seltext_m = 'Status'.
fieldcatalog-col_pos = 2.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'AEDAT'.
fieldcatalog-seltext_m = 'Item change date'.
fieldcatalog-col_pos = 3.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_m = 'Material Number'.
fieldcatalog-col_pos = 4.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MENGE'.
fieldcatalog-seltext_m = 'PO quantity'.
fieldcatalog-col_pos = 5.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'MEINS'.
fieldcatalog-seltext_m = 'Order Unit'.
fieldcatalog-col_pos = 6.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'NETPR'.
fieldcatalog-seltext_m = 'Net Price'.
fieldcatalog-col_pos = 7.
fieldcatalog-outputlen = 15.
fieldcatalog-do_sum = 'X'.
fieldcatalog-datatype = 'CURR'.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
fieldcatalog-fieldname = 'PEINH'.
fieldcatalog-seltext_m = 'Price Unit'.
fieldcatalog-col_pos = 8.
append fieldcatalog to fieldcatalog.
clear fieldcatalog.
endform. " BUILD_FIELDCATALOG
*& Form BUILD_LAYOUT
Build layout for ALV grid report
form build_layout.
gd_layout-no_input = 'X'.
gd_layout-colwidth_optimize = 'X'.
gd_layout-totals_text = 'Totals'(201).
gd_LAYOUT-coltab_fieldname = 'CELLCOLOR'. "CTAB_FNAME
endform. " BUILD_LAYOUT
*& Form DISPLAY_ALV_REPORT
Display report using ALV grid
form display_alv_report.
gd_repid = sy-repid.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = gd_repid
i_callback_top_of_page = 'TOP-OF-PAGE' "see FORM
i_callback_user_command = 'USER_COMMAND'
i_grid_title = outtext
is_layout = gd_layout
it_fieldcat = fieldcatalog[]
it_special_groups = gd_tabgroup
it_events = gt_events
is_print = gd_prntparams
i_save = 'X'
is_variant = z_template
tables
t_outtab = it_ekko
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " DISPLAY_ALV_REPORT
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
form data_retrieval.
select ebeln ebelp statu aedat matnr menge meins netpr peinh
up to 10 rows
from ekpo
into CORRESPONDING FIELDS OF TABLE it_ekko.
endform. " DATA_RETRIEVAL
Form TOP-OF-PAGE *
ALV Report Header *
Form top-of-page.
*ALV Header declarations
data: t_header type slis_t_listheader,
wa_header type slis_listheader,
t_line like wa_header-info,
ld_lines type i,
ld_linesc(10) type c.
Title
wa_header-typ = 'H'.
wa_header-info = 'EKKO Table Report'.
append wa_header to t_header.
clear wa_header.
Date
wa_header-typ = 'S'.
wa_header-key = 'Date: '.
CONCATENATE sy-datum+6(2) '.'
sy-datum+4(2) '.'
sy-datum(4) INTO wa_header-info. "todays date
append wa_header to t_header.
clear: wa_header.
Total No. of Records Selected
describe table it_ekko lines ld_lines.
ld_linesc = ld_lines.
concatenate 'Total No. of Records Selected: ' ld_linesc
into t_line separated by space.
wa_header-typ = 'A'.
wa_header-info = t_line.
append wa_header to t_header.
clear: wa_header, t_line.
call function 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = t_header.
i_logo = 'Z_LOGO'.
endform. "top-of-page
*& Form SET_CELL_COLOURS
Set colour of individual ALV cell, field
FORM SET_CELL_COLOURS .
DATA: WA_CELLCOLOR TYPE LVC_S_SCOL.
DATA: ld_index TYPE SY-TABIX.
LOOP AT IT_EKKO into wa_ekko.
LD_INDEX = SY-TABIX.
Set colour of EBELN field to various colors based on sy-tabix value
WA_CELLCOLOR-FNAME = 'EBELN'.
WA_CELLCOLOR-COLOR-COL = sy-tabix. "color code 1-7, if outside rage defaults to 7
WA_CELLCOLOR-COLOR-INT = '1'. "1 = Intensified on, 0 = Intensified off
WA_CELLCOLOR-COLOR-INV = '0'. "1 = text colour, 0 = background colour
APPEND WA_CELLCOLOR TO wa_ekko-CELLCOLOR.
MODIFY it_ekko from wa_ekko INDEX ld_index TRANSPORTING CELLCOLOR.
Set colour of NETPR field to color 4 if gt 0
if wa_ekko-netpr gt 0.
WA_CELLCOLOR-FNAME = 'NETPR'.
WA_CELLCOLOR-COLOR-COL = 4. "color code 1-7, if outside rage defaults to 7
WA_CELLCOLOR-COLOR-INT = '0'. "1 = Intensified on, 0 = Intensified off
WA_CELLCOLOR-COLOR-INV = '0'. "1 = text colour, 0 = background colour
APPEND WA_CELLCOLOR TO wa_ekko-CELLCOLOR.
MODIFY it_ekko from wa_ekko INDEX ld_index TRANSPORTING CELLCOLOR.
endif.
Set colour of AEDAT field text to red(6)
WA_CELLCOLOR-FNAME = 'AEDAT'.
WA_CELLCOLOR-COLOR-COL = 6. "color code 1-7, if outside rage defaults to 7
WA_CELLCOLOR-COLOR-INT = '0'. "1 = Intensified on, 0 = Intensified off
WA_CELLCOLOR-COLOR-INV = '1'. "1 = text colour, 0 = background colour
APPEND WA_CELLCOLOR TO wa_ekko-CELLCOLOR.
MODIFY it_ekko from wa_ekko INDEX ld_index TRANSPORTING CELLCOLOR.
ENDLOOP.
ENDFORM. " SET_CELL_COLOURS -
I'd like a Java Script that will allow the user to change character colors in a document using a drop-down menu to select the new color, or a form the user can type the new color into. Has anyone seen anything like this?
We're setting up a document in which certain elements (folios, drop-caps, etc.) are one color in one month's publication. They change to another color the next month, and so on.
I'm looking for an efficient way to change all of them.
My thought was to have a script that would read the colors specified in stylesheets and then allow the user to change the color based on input from a drop-down menu or form.
Maybe you are looking for
-
How do I add my bank website to the list?
How do I add my bank opening page on the bookmark list?
-
Trying to link EIPO foreign trade data to VBAK,LIPS,LIKP,KNA1,TVROT
Hi I am trying to link table EIKO - Foreign Trade data on delivery item data to my existing Quickview which has the following tables, VBAK - Sales Doc header LIPS - Delivery item LIKP - Delivery header TVROT - Route KNA1 - general data in customer ma
-
LabVIEW has a set of SI-Config/Read/etc VI's that take data from the computer's microphone input. A configuration option is Mono-versus-Stereo. Does anybody have a list (or even one example) of Stereo sound input cards that work with these LabVIEW SI
-
Communication between SAP e-recruitment and 3rd party website
Hi, We are implementing e-recruitment module and would like to know how to transport a recruitment advertisement created in SAP e-Recruitment to a job website. Should we use IDOC and XI? Or is there some other way of doing it? How does SAP e-Recruitm
-
Install two 10gAS infrastructure databases in a same server
Can I install two 10AS infrastructure database in a same server? Each database will be used for different purposes.