Mouse over to change cell color
Can anyone point me to a really good tutorial for doing mouse
over also
changes the cell color?.
Ive tried a few and spent hours on it and just cannot get it
to work
correctly.
Here is my basic starting .css which i start off with each
time.
.tnav {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
.tnav a:link {
color: #FFFFFF;
font-size: 12px;
text-decoration: none;
.tnav a:visited {
color: #FFFFFF;
text-decoration: none;
.tnav a:hover {
color: #FFFFFF;
text-decoration: underline;
.tnav a:active {
color: #FFFFFF;
On Thu, 8 Mar 2007 14:42:35 -0000, "Mike"
<[email protected]> wrote:
>Can anyone point me to a really good tutorial for doing
mouse over also
>changes the cell color?.
Change your CSS to this:
.tnav {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
.tnav a {
color: #FFFFFF;
display: block;
text-decoration: none;
.tnav a:hover {
color: #FFFFFF;
text-decoration: underline;
Add a conditional comment to the <head> of the document
to correct for
an IE browser bug:
<!--[if ie]>
<style type="text/css">
.tnav a {
height: 1%;
</style>
<![endif]-->
Gary
Similar Messages
-
Change cell color of query results,font size,style
Change cell color of query results,font size,style
Hello
I have this code below and I want to know if it is possible
to make the column header a font style different
Example:
Font size =12
Verdena
blue
And the cell of the column name a different color for ex
Yellow
Can this be done here and where in this code do I put it??
Thank you so much
<cfquery name="gelov datasource="kl90">
SELECT
FROM
WHERE
ORDER BY
<cfswitch expression="#Form.orderBy#">
<cfks value="KSNUMBER">
KS.KS_NBR
</cfks>
<cfks value="CREATIONDATE">
KS.KREATDAT
</cfks>
</cfswitch>
</cfquery>
<!---html report--->
<cfswitch expression="#Form.outputFormat#">
<cfks value="HTML">
<!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=iso-8859-1" />
<title>Ctwye Kss Report</title>
</head>
<style type="text/css">
table{
font-family:Arial, Helvetica, sans-serif;
font-size:10px;
td{
font-family:Arial, Helvetica, sans-serif;
font-size:10px;
th{
font-family:Arial, Helvetica, sans-serif;
font-size:10px;
h2{
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
h3{
font-family:Arial, Helvetica, sans-serif;
font-size:13px;
</style>
<body>
<cfoutput>
<table border="0" cellpadding="3" cellspacing="0">
<tr>
<td align="center">
<h3>Ctwye Kss
Report</h3><br><br></td>
</tr>
<tr>
<td align="center">
</h2>report returned #getCtwyeKss.RecordCount#
records</h2></td>
</tr>
<tr>
<td>
<table border="1" cellpadding="2" cellspacing="0">
<tr>
<td width="160">Ks Number</td>
<td>K-date</td>
<!--- <td class="dataField">Address</td>
<td class="dataField">Type</td>
<td class="dataField">Description</td>--->
</tr>
<cfloop query="getCtwyeKss">
<tr bgcolor="<cfif currentrow mod
2>GHOSTWHITE<cfelse>WHITE</cfif>">
<td>#KS_NBR#</td>
<td>#dateformat(KREATDAT,"mm/dd/yyyy")#</td>
</tr>
</cfloop>
</table>
</td>
</tr>
</table>
</BODY>
</HTML>
</cfoutput>
</cfks>
<cfks value="CSV">
<CFHEADER NAME="Content-Disposition" VALUE="attachment;
filename=ctwye.csv">
<cfcontent type="application/msexcel">"Ks
Number","K-date"
<cfoutput
query="getCtwyeKss">#ltrim(KS_NBR)#,"#dateformat(KREATDAT,"mm/dd/yyyy")#"
<tr #IIF(getCtwyeKss.CurrentRow MOD
2,DE(''),DE('backgroundColor="##999"'))#>
<!---<tr bgcolor="<cfif currentrow mod
2>##808080<cfelse>##ffffff</cfif>"> --->
</cfoutput>
</cfks>
</cfswitch>By using <TH> instead of <TD> on your header row
you can then specify different font type and size in your CSS code.
th{
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
I'm guessing this is your header?
<tr>
<td width="160">Ks Number</td>
<td>K-date</td>
<!--- <td class="dataField">Address</td>
<td class="dataField">Type</td>
<td class="dataField">Description</td>--->
</tr>
If so, change these <TD> to <TH>
<tr>
<th width="160">Ks Number</th>
<th>K-date</th>
<!--- <th class="dataField">Address</th>
<th class="dataField">Type</th>
<th class="dataField">Description</th>--->
</tr> -
Mouse over speed change question...
I was wondering. On my website, I like to have it where I can mouse over a picture and it changes to another. Now, it instantly changes which is fine but I would love for it to fade to the next picture. Instead of an instant change, I would love it to take about a half a second like a fade out to the next picture and not instant. Is this possible in Dreamweaver CS4?
jQuery can do that. :-))
http://bavotasan.com/tutorials/creating-a-jquery-mouseover-fade-effect/
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb -
Change Cell Color of JTable-Please Help
Hi All,
I want to change the color of a Row in a JTable when i click on it. And After that when i click another row i want to retain this color and give another color to the second row.
If somebody knows how to do this. Do Help
Thanks in advance
-JeenaHi,
thanks for the fast reply
Using a TableCellRenderer i was able to give colors to the selected row. But when i click another row the color disappears.
Thanks,
Jeena -
Change cell color in jdbTable?
Hi, I have a jdbTable ... and the result are a result of a query ...
jdbTable.setDataSet(queryDataSet);
the rusult are:
Name - Surname - child - married
I'd like to change row color when the married is yes and when the child are > 0
Is it possible to do it? Because I found only JTable example.
Thank you very muchSorry the component name is wdr_test_table in view SNGL_MARK_CELL see the method wddoinit( ).
Regards
Yash -
Change cell color based on time
I have a row with 24 cells. I want each cell (from left to right) to change color based on the time. Each cell will represent 1 hour A1=Midnight, B2=1AM, etc... At those specific hours I'd like the corresponding cell to change color. So, at midnight, A1 will change from white to red. I figured I could do this with conditional formatting.
I created a table with =NOW() and formatted it to display only the hour. I then created my 24 column row and pointed each cell in that row to that =NOW() cell. Each cell now displayed the current hour. I setup conditional formatting so that, for example, if A2=1AM (as displayed in the cell) then the formatting would change, but this didn't seem to work. I'm guessing the conditional formatting is just seeing the formula and not the value in the cell. Any thoughts here?There are a couple of issues involved:
1. Conditional formatting rules compare the value in the cell to be formatted to a fixed value or to the value in another cell. If the rule says "=", then the values must be exactly the same.
2. Date and Time values in Numbers always contain both a time component and a date component. Always. The cell may be formatted to display only the time, only the date, or both, but no matter what is displayed, the values are equal only if the complete Date and Time value is the same.
3. "Midnight", "1AM", are text values. They will never be equal to a Date and Time value.
So the problems are to:
• Extract the Hour from the Date and Time value returned by NOW()
• Convert that number to a text value in the form "9AM", "9PM", or optionally "Midnight", and I presume, "Noon"
• Store that changeable value where it may be compared to the value in the cell to be conditionally formatted.
• Construct the rule to format the cell(s).
Row 1 contains a sample of the 24 cells to be formatted.
Columns D and E, rows 2 to 25 are a LOOKUP table, where the HOUR value is looked up and the corresponding text value returned.
F2 (highlighted with an orangeish fill) contains the formula which extracts the HOUR value from NOW(), looks it up and returns the value displayed (and to be compared).
F2: =LOOKUP(HOUR(NOW()),D2:D25,E2:E25)
Regards,
Barry
Edit: Second thought
The LOOKUP table can be avoided using this formula in F2
=OFFSET($A$1,0,HOUR(NOW())-15)
The -15 at the end of the formula works for my sample table, in which column 1 (column A) is 3PM. For column A=Midnight, the shift should be -0 (or just left off).
Message was edited by: Barry -
Change cell color if number is different from previous cell
Hello all and thank you in advance for any help that is provided.
I want to have the color of text in one cell change if the number entered into that cell is higher than the number entered in the previous cell.
Example: If cell A=18 and cell B=18 then the font color in both cells is the same.
If cell A=18 and cell B=20 then the color of the font in cell B should change to another color.
I have done my best to look through the posted questions to no avail so I apologize if this has already been answered.
AJInspector > Format (42)
Select B2 > Conditional format > Greater than > A2 > Edit > Text > Red, Green whatever. Done.
As usual the format in B2 can be dragged down by the little o bottom right to B3, B4 etc.
S. -
Changing cell colors of Webapplication
Dear all,
I want to create a report that does highlights specific cells with colors and/or bold letters.
The example is:
I have a keyfigure consumption and a characteristic consumption_type.
The consumtion_type defines where the consumption occures e.g. facility, block etc.
Now I want to highlight the consumption value with different colors for the consumption_type e.g. facility=red, block=blue
The consumption value should be hightlighted and not the type. It would be perfect if the type would not even be shown.
How can I achive this?
Thanks,
AndreasHello Vineet,
Thank you for your reply.
That helped me to get an idea of what is possible there.
I found the following link:
http://help.sap.com/saphelp_nw04/helpdata/en/96/42393c3eb3036be10000000a11402f/frameset.htm
So you saying its possible also to remove cells (e.g. consumption_type) which is only needed to indentify the colors but should not be seen in the report?
I also read in SAP note 931395 that with BW 7.0 it should be possible to manipulate the reports with java (the same that is done now with Abap). Do you have any information about this?
Thanks,
Andreas
Message was edited by:
Andreas Schuth -
Change cell colors used within a function
While using various functions in a spreadsheet I use to track my bills on a monthly basis, the functions do a great job of highlighting all the cells included. The problem is.....I cannot see them well, some not at all, since I am color blind and the palette seems to be a very light, pastel. Is there a way to control the colors used by functions to highlight in more basic colors or darker grays?
Thanks!i,
Have you explored the contrast enhancement options in System Preferences, Personal, Universal Access, Seeing, Display?
Regards,
Jerry -
Hello,
i want to find the max value in my report column and change the background color of it using field expression.
Thanks in AdvanceYou are putting the expression into the fill color of the appropriate textbox? Altering the column name and data set name as appropriate?
That expression deffinetly does the job in SSRS 05, 08 and 10. -
Changing the color of text while mouse listener.
Hi all. working on an assignment for school and I need a little hint.
I am creating an applet to basically input names in txt blocks, and then you hit a button that will move the names to a text area. Well the instructor asked us to use a mouse listener to change the color of the labels on the txt blocks. Basically when you hover your mouse over the button it is supposed to change the color of the button (for and back ground), and change the color of the labels on the txt blocks.
I just did a general setForground(color.blue);
for my labels default color and it seemed to do the trick, I used the following code to try to change the color of both the buttons and the txt block labels, but only the button works.
Please assist..
public class Assignment2 extends java.applet.Applet implements ActionListener, MouseListener {
public void mouseExited(MouseEvent e){
//Colors Back
setForeground(Color.blue);
btnAdd.setForeground(Color.red);
btnAdd.setBackground(Color.yellow);
//Clear Status bar
showStatus("");
public void mouseClicked(MouseEvent e) {
//empty Method
public void mousePressed(MouseEvent e){
//empty method
public void mouseReleased(MouseEvent e){
//empty methodHI,
Sorry for delay. I was not on my seat.
I've modified your code and the label colors are changing now on the mouse over or out events.
I did this only for a single label i.e. "First Name". Just have a look on the code and do the same for the rest labels.
If u feel any problem, then revert to me.
Bye
(Dhananjay Singh)
Here's Your Code
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
public class ColorText extends java.applet.Applet implements ActionListener, MouseListener {
//Declare components
TextField txtName = new TextField(25);
TextField txtLast = new TextField(25);
TextField txtAdd = new TextField(30);
TextField txtCity = new TextField(15);
TextField txtState = new TextField(2);
TextField txtZip = new TextField(10);
Label fName = null;
Label lName = null;
Label address = null;
Label citi = null;
Label state = null;
Label zip = null;
Button btnAdd = new Button("Display Address");
TextArea txaAdd = new TextArea(10, 30);
//Declare variables
String strName;
String strLast;
String strAdd;
String strCity;
String strState;
String strZip;
public void init() {
//Create labels
fName = new Label("First Name");
lName = new Label("Last Name");
address = new Label("Address");
citi = new Label("City");
state = new Label("State");
zip = new Label("Zip");
fName.addMouseListener(new MouseListener() {
public void mouseEntered(MouseEvent e) {
fName.setBackground(Color.RED);
public void mouseClicked(MouseEvent e) {
public void mouseExited(MouseEvent e) {
fName.setBackground(Color.YELLOW);
public void mousePressed(MouseEvent e) {
public void mouseReleased(MouseEvent e) {
setForeground(Color.blue);
Font g = new Font("Serif", Font.BOLD, 14);
setFont(g);
add(fName);
add(txtName);
add(lName);
add(txtLast);
add(address);
add(txtAdd);
add(citi);
add(txtCity);
add(state);
add(txtState);
add(zip);
add(txtZip);
add(btnAdd);
add(txaAdd);
txtName.requestFocus();
//Colors and Fonts
Font fntName = new Font("Serif", Font.BOLD, 14);
setBackground(Color.lightGray);
txtName.setFont(fntName);
txtName.setForeground(Color.blue);
txtAdd.setFont(fntName);
txtAdd.setForeground(Color.blue);
txtLast.setFont(fntName);
txtLast.setForeground(Color.blue);
txtCity.setFont(fntName);
txtCity.setForeground(Color.blue);
txtState.setFont(fntName);
txtState.setForeground(Color.blue);
txtZip.setFont(fntName);
txtZip.setForeground(Color.blue);
btnAdd.setForeground(Color.RED);
btnAdd.setBackground(Color.yellow);
//listeners
btnAdd.addActionListener(this);
txtName.addActionListener(this);
txtLast.addActionListener(this);
txtAdd.addActionListener(this);
txtCity.addActionListener(this);
txtState.addActionListener(this);
txtZip.addActionListener(this);
btnAdd.addMouseListener(this);
public void actionPerformed(ActionEvent e) {
//Actions
String strOutputLine; //Declare local variable
//Assign text fields
strName = txtName.getText();
strLast = txtLast.getText();
strAdd = txtAdd.getText();
strCity = txtCity.getText();
strState = txtState.getText();
strZip = txtZip.getText();
//Move variables down
strOutputLine = strName + ("\n") + strLast + ("\n") + strAdd + ("\n") + strCity + ("\n") + strState + ("\n") + strZip + ("\n") + ("\n") ;
//Append
txaAdd.append(strOutputLine);
//Clear Text Fields
txtName.setText("");
txtLast.setText("");
txtAdd.setText("");
txtCity.setText("");
txtState.setText("");
txtZip.setText("");
//set focus back to Lastname
txtName.requestFocus();
public void mouseEntered(MouseEvent e) {
// Changing of Button colors
setForeground(Color.red);
btnAdd.setForeground(Color.magenta);
btnAdd.setBackground(Color.green);
//Status bar text
showStatus("Format Address into Text Area");
public void mouseExited(MouseEvent e){
//Colors Back
setForeground(Color.blue);
btnAdd.setForeground(Color.red);
btnAdd.setBackground(Color.yellow);
//Clear Status bar
showStatus("");
public void mouseClicked(MouseEvent e) {
//empty Method
public void mousePressed(MouseEvent e){
//empty method
public void mouseReleased(MouseEvent e){
//empty method
}(Dhananjay Singh) -
Must Mouse Over to Start Playback
I have an FLV player that plays just fine locally. When I
load everything onto a webserver, it still plays fine. If I call
the JavaScript to create the Flash ActiveX object (only having this
problem in IE) from a web page on a different domain, that's where
I start having problems. Nothing happens until I mouse-over the
control. This does NOT seem to be the standard ActiveX security
thing, which I have already handled in the external JavaScript
file. Any ideas?On Thu, 8 Mar 2007 14:42:35 -0000, "Mike"
<[email protected]> wrote:
>Can anyone point me to a really good tutorial for doing
mouse over also
>changes the cell color?.
Change your CSS to this:
.tnav {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #FFFFFF;
.tnav a {
color: #FFFFFF;
display: block;
text-decoration: none;
.tnav a:hover {
color: #FFFFFF;
text-decoration: underline;
Add a conditional comment to the <head> of the document
to correct for
an IE browser bug:
<!--[if ie]>
<style type="text/css">
.tnav a {
height: 1%;
</style>
<![endif]-->
Gary -
Display comments on mouse over
Hi Gurus,
I need to display comments on mouse over on the cell in web report.
In a web report, when a user right click on a cell and click 'Goto' and 'create comment' and enters and saves a comment then I can view the comment using a 'List of documents' web item.
But I need to see the comments directly when the 2nd user mouse over on the same cell.
can any one please help me out to do this. we are in 3.5 environment.
Thanks
PrasadHi,
Check out this link mentioned below:
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/1035ca90-0201-0010-13b7-9a35063d6a18
In this, when u goto page 20, there ia one SAP BW URL, which will help even to add a tooltip in WAD 3.5.
I havent tried it, but you can give a try.
Hope this helps you.!
-Pradnya -
Set Cell Color without using DefaultTableCellRenderer
Hi,
Is there any possible to set the JTable cell color without using DefaultTableCellRenderer ?. For ex, I have one JTable that having 9 rows and 9 columns. I have to set the cell color in 2nd row & 3rd column.
Please anyone give me guidance to solve this.
Thanks & Regards
S SenthilkumarFine.. Please try to understand my points.
Because in my application I have JTable that having 10 columns and rows dynamically will come based on the value fetch from arraylist. If I use DefaultTableCellRenderer, for each record its calling CustomTableCellRenderer(). For example arraylist return 10 rows means its looping 100 times(10 rows * 10 columns).
CustomTableCellRenderrer.java
ArrayList dataLiveMarket = (ArrayList) new CheckUser().getLiveMarketDetails(unval);
CustomTableModel modelLiveMarket = new CustomTableModel(dataLiveMarket);
JTable tableOne = new JTable(modelLiveMarket);
tableOne.setDefaultRenderer(Object.class, new CustomTableCellRenderer());
CustomTableCellRenderrer.java
package com.fxtrading.dao;
import java.awt.Color;
import java.awt.Component;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.TableModel;
* @author user
public class CustomTableCellRenderer extends DefaultTableCellRenderer {
//private TableModel bidLastPrice;
//int k;
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
boolean hasFocus,
int row, int column) {
Component component =
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
if (column == 0 || column == 1|| column == 2) {
setHorizontalAlignment(SwingConstants.LEFT);
} else if(column == 3 || column == 4 || column == 5 || column == 6 || column == 7 || column == 8){
setHorizontalAlignment(SwingConstants.RIGHT);
}else if(column == 9){
setHorizontalAlignment(SwingConstants.CENTER);
// Change cell Color - Started
bidLastPrice = table.getModel();
int bidLastRowCount =(int)table.getRowCount();
for(k=0; k<bidLastRowCount; k++) {
String bidPrice = (String)bidLastPrice.getValueAt(k,4);
String lastPrice = (String)bidLastPrice.getValueAt(k,8);
bidPrice = bidPrice.replace(",","").replace("$","");
lastPrice = lastPrice.replace(",","").replace("$","");
if(Double.parseDouble(bidPrice)<Double.parseDouble(lastPrice)){
if(row == k && column == 4){
component.setBackground(Color.RED);
}else{
component.setBackground(Color.WHITE);
System.out.println("Row Count -->"+k+" Less ----> Bid Price----> "+Double.parseDouble(bidPrice)+" : Last Price----> "+Double.parseDouble(lastPrice));
}else{
if(row == k && column == 4){
component.setBackground(Color.GREEN);
}else{
component.setBackground(Color.WHITE);
System.out.println("Row Count -->"+k+" More ----> Bid Price----> "+Double.parseDouble(bidPrice)+" : Last Price----> "+Double.parseDouble(lastPrice));
// Change cell Color - End
return component;
}Thanks & Regards,
S Senthilkumar -
Hi, how can i change the color of column heading during mouse over a particular column.?
Does anyone know any html code for this?Hi, how can i change the color of column heading during mouse over a particular column.?
Does anyone know any html code for this?
Maybe you are looking for
-
I've some questions after an agent report has been generated. In the agent detail report, I found that a specific call handled by the agent has a call with Talk Time for more than 9 hours (Call Type : Inbound ACD, Transfer-in). However, the duration
-
Oracle XSLT transformer will ever support XSLT 2.0 specs? -- Deha Peker
-
GroupWise POA Agent stopping several times a week.
We have two servers Suse Linux 11.1 64/OES11 with services GroupWise 8.0.2, (POA, MTA and GWIA), we have two post offices, one with 300 and another with 500 users. When this service was running GroupWise on Netware 6.5, worked perfectly. After migrat
-
GlassFish PDF Printing question
Hi all, I am looking into some options of integrating PDF Printing to our APEX application. So far I've managed to have Apache FOP and Tomcat+Cocoon working. Has anybody tried to have PDF printing capabilities with GlassFish as web server? If so, are
-
How to find local systems free space?
Hi all, Can any one tell me, how to find C: free space in windows using java?