Changing color of table
How can I change the color of webdynpro table in which all fields are Textviews.It looks in blue color but I want to get all field in white color
Thanks
FahadHamsa
One possibility is to create your own theme, but this is a little bit of work.
Another one is to set Table.design=transparent which works for read-only tables.
Armin
Similar Messages
-
How to change color in table header
I have a table model like below I can change column colors (background or foreground ) but I couldn't change table headers color in my application . Basicly I want to change color of "Grup Adı","Kişi Sayısı" column headers.
Please help
thanks
class MyTableModel extends AbstractTableModel {
public String[] columnNames = {
"Grup Adı","Kişi Sayısı",
public int getColumnCount() {
return columnNames.length;
public int getRowCount() {
return data.length;
public String getColumnName(int col) {
return columnNames[col];
public Object getValueAt(int row, int col) {
return data[row][col];
public Class getColumnClass(int c) {
return getValueAt(0, c).getClass();
public boolean isCellEditable(int row, int col) {
return true;
public void setValueAt(Object value, int row, int col) {
if (DEBUG) {
System.out.println("Setting value at " + row + "," + col
+ " to " + value
+ " (an instance of "
+ value.getClass() + ")");
data[row][col] = value;
fireTableCellUpdated(row, col);
if (DEBUG) {
System.out.println("New value of data:");
printDebugData();
}You have to implement a TableCellRenderer and affect it to your columns with:myTable.getColumnModel().getColumn(0).setHeaderRenderer(myTableCellRenderer);
-
How to change color of tables and regions in OA Framework pages
Dear all
I want to change colour of tables and regions of oracle standard pages.One way to do it is that I can add code for tables and regions CSS definitions in for each page in correspoding CO,which is not feasible since we have large number of COs in standard pages.I heard that oracle has provided some method to change look and feel of the pages.If anybody knows about it ,plz do let me know.
Thanks in advance
BhupendraCheck personalization guide and read out "Customizing Look-and-Feel (CLAF)" Topic.
-
How to change colors of table col and row header?
Could I change table header colors when run vi ? Is such a thing possible?
ex: Header words color from black changed to green in column 2 of table.cloud a écrit:
...But I mean is "How to change header words color" not changed cell words color.
tst gave you the answer ! A header cell is just a cell with a -1 value as index...
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left... -
Changing color of table borders w/o ccs
How do I change the color of the borders of my table in Dreavweaver CS6 wi/o usiing css?
Javascript.
tbl = document.getElementById('tableID').style.border = "1px solid red";
Untested.. I've never tried to change a table border.. but it works on DIVs and other elements.
^_^ -
How can i Change Text Color in table
How can i change the text color i table, the true becoming GREEN, and the text in Fals becoming RED.
Someone can help me to resolve this problem with a sample, because when i run the program all text becoming green in (TRUE) and than when i chang it to the (fals) all becoming Red.
Attachments:
Color.vi 38 KBModifying the properties of a control in a subVI do not modify the properties of a different control in the main VI. The data is the only thing passed back from the subVI. To modify the properties of the table in the main, you need to pass a reference to it to the subVI and modify it's properties. I've attached a modified llb that does what you want.
Attachments:
Main_color_Table_mod.llb 41 KB -
How can I get a table cell to change color if its below some value
Hi everyone, I use JDeveloper with JHeadstart and just finished the tutorial using the predefined HR schema. I was wondering how would I go about making the color of a cell to change to red if it falls below 5. So for example if I was to measure the amount of printer cartridges we had in storage, and it falls to below 5, in the table that has the equipment the cell changes color to red?
You better aks this question on the jdeveloper forum as it is not related to jheadstart.
Once you know how to do this, this forum can help you woth keeping your page generatable using a custom template.
See also the chapter on customizing generator output in the jheadstart developers guide.
Steven davelaar,
Jheadstart team. -
How can i change the color of table control' lines?
Such as the subject. Thanks in advance!
Hi,
Please check,
TABLE CONTROL LINES COLOR CHANGE
color rows in table control
Regards,
Hema.
Reward points if it is useful. -
SAPSCRIPT: How change background color cell/table
Hi!
How can I change background color cell/table in Sapscript?
Thanks very much!Hi ,
Normally we use Scripts and smartforms for submitting the output to customers or for tax purpose and so on,,in such case we wont submit in differnt color other than white and black,so formatting in other colors is not possible in Script and smartforms.
Please let me know if have any issues on this.
Thanks and regards,
Rajeshwar -
How to change color of selected label from list of labels?
My Problem is that I have a list of labels. RowHeaderRenderer is a row header renderer for Jtable which is rendering list items and (labels).getListTableHeader() is a method to get the list. When we click on the label this code is executed:
getListTableHeader().addMouseListener(new MouseAdapter()
public void mouseReleased(MouseEvent e)
if (e.getClickCount() >= 1)
int index = getListTableHeader().locationToIndex(e.getPoint());
try
if (((ae_AlertEventInfo)theAlerts.values().toArray()[index]).ackRequiredFlag)
AcknowledgeEvent ackEvent = new AcknowledgeEvent(
this, (ae_AlertEventInfo)theAlerts.values().toArray()[index]);
fireAcknowledgeEvent(ackEvent);
((HeaderListModel)listModel).setElementAt(ACK, index);
catch(Exception ex) {;}
Upon mouse click color of the label should be changed. For some period of time ie. Upto completion of fireAcknowledgeEvent(ackEvent);
This statement is calling this method:
public void handleAcknowledgeEvent(final AcknowledgeEvent event)
boolean ackOk = false;
int seqId = ((ae_AlertEventInfo)event.getAlertInfo()).sequenceId;
if (((ae_AlertEventInfo)event.getAlertInfo()).ackRequiredFlag)
try
// perform call to inform server about acknowledgement.
ackOk = serviceAdapter.acknowledge(seqId,
theLogicalPosition, theUserName);
catch(AdapterException aex)
Log.error(getClass(), "handleAcknowledgeEvent()",
"Error while calling serviceAdapter.acknowledge()", aex);
ExceptionHandler.handleException(aex);
else
// Acknowledge not required...
ackOk = true;
//theQueue.buttonAcknowledge.setEnabled(false);
final AlertEventQueue myQueue = theQueue;
if (ackOk)
Object popupObj = null;
synchronized (mutex)
if( hasBeenDismissed ) { return; }
// mark alert event as acknowledged (simply reset ack req flag)
ae_AlertEventInfo info;
Iterator i = theAlerts.values().iterator();
while (i.hasNext())
info = (ae_AlertEventInfo) i.next();
if (info.sequenceId == seqId)
// even if ack wasn't required, doesn't hurt to set it
// to false again. But it is important to prevent the
// audible from playing again.
info.ackRequiredFlag = false;
info.alreadyPlayed = true;
// internally uses the vector index so
// process the queue acknowledge update within
// the synchronize block.
final ae_AlertEventInfo myAlertEventInfo = event.getAlertInfo();
SwingUtilities.invokeLater(new Runnable()
public void run()
myQueue.acknowledge(myAlertEventInfo);
myQueue.updateAcknowledgeButtonState();
// here we should stop playing sound
// if it is playing for this alert.
int seqId1;
if (theTonePlayer != null)
seqId1 = theTonePlayer.getSequenceId();
if (seqId1 == seqId)
if (! theTonePlayer.isStopped())
theTonePlayer.stopPlaying();
theTonePlayer = null;
// get reference to popup to be dismissed...
// The dismiss must take place outside of
// the mutex... otherwise threads potentially
// hang (user hits "ok" and is waiting for the
// mutex which is currently held by processing
// for a "move to summary" transition message.
// if the "dismiss" call in the transition
// message were done within the mutex, it might
// hang on the dispose method because the popup
// is waiting for the mutex...
// So call popup.dismiss() outside the mutex
// in all cases.
if(event.getSource() instanceof AlertEventPopup)
popupObj = (AlertEventPopup)event.getSource();
else
popupObj = thePopups.get(event.getAlertInfo());
thePopups.remove(event.getAlertInfo());
SwingUtilities.invokeLater(new Runnable()
public void run()
// search vector elements to determine icon color in main frame
String color = getColor();
fireUpdateEvent(new UpdateEvent(this, blinking, color));
// Call dismiss outside of the mutex.
if (popupObj !=null)
if(popupObj instanceof AlertEventPopup)
((AlertEventPopup)popupObj).setModal(false);
((AlertEventPopup)popupObj).setVisible(false); // xyzzy
((AlertEventPopup)popupObj).dismiss();
else
// update feedback... ack failed
SwingUtilities.invokeLater(new Runnable()
public void run()
myQueue.setInformationMessage("Acknowledge failed to reach server... try again");
return;
Code for RowHeaderRenderer is:
class RowHeaderRenderer extends JLabel implements ListCellRenderer
JTable theTable = null;
ImageIcon image = null;
RowHeaderRenderer(JTable table)
image = new ImageIcon(AlertEventQueue.class.getResource("images" + "/" + "alert.gif"));
theTable = table;
JTableHeader header = table.getTableHeader();
setOpaque(true);
setHorizontalAlignment(LEFT);
setForeground(header.getForeground());
setBackground(header.getBackground());
setFont(header.getFont());
public Component getListCellRendererComponent( JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus)
int level = 0;
try
level = Integer.parseInt(value.toString());
catch(Exception e)
level = 0;
if (((ae_AlertEventInfo)theAlerts.values().toArray()[index]).ackRequiredFlag)
setBorder(UIManager.getBorder("TableHeader.cellBorder"));
this.setHorizontalAlignment(JLabel.CENTER);
this.setVerticalAlignment(JLabel.CENTER);
setIcon(image);
else
setBorder(BorderFactory.createLineBorder(Color.gray));
setText("");
setIcon(null);
return this;
I tried but when i am clicking a particular label, the color of all labels in the List is being changed. So can you please assist me in changing color of only the label that is selected and the color must disappear after completion of Upto completion of fireAcknowledgeEvent(ackEvent);im a bit confused with the post so hopefully this will help you, if not then let me know.
I think the problem is that in your renderer your saying
setBackground(header.getBackground());which is setting the backgound of the renderer rather than the selected item, please see an example below, I created a very simple program where it adds JLabels to a list and the renderer changes the colour of the selected item, please note the isSelected boolean.
Object "value" is the currentObject its rendering, obviously you may need to test if its a JLabel before casting it but for this example I kept it simple.
populating the list
public void populateList(){
DefaultListModel model = new DefaultListModel();
for (int i=0;i<10;i++){
JLabel newLabel = new JLabel(String.valueOf(i));
newLabel.setOpaque(true);
model.addElement(newLabel);
this.jListExample.setModel(model);
this.jListExample.setCellRenderer(new RowHeaderRenderer());
}the renderer
class RowHeaderRenderer extends JLabel implements ListCellRenderer
JTable theTable = null;
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus){
JLabel aLabel = (JLabel)value;
if (isSelected){
aLabel.setBackground(Color.RED);
}else{
aLabel.setBackground(Color.GRAY);
return aLabel;
} -
I need help highlighting cells on my Numbers '09 spreadsheet. I want the cell text/fill to change color when the date is 180 days or less from the current date. I already have a cell with the current date in it. I also know how to change the fill/text colors. All the cells have been formatted to show date only. I am having trouble with the formula. I can get to the Conditional Formatting menu and select "With Dates" but after that I am lost. Can anyone help?
Thank you for any assistance.
BSet a Conditional Format rule as shown in the illustration below. The rule has been applied to all dates in column B of the table.
Regards,
Barry -
How to Change colors in Graphs
Hi Friends,
Please tell me where i can change color options for graph view's.
Thank You
Sunil.Hi Sunil
Go to graph properties --> Style table --> click on the icon to edit graph data --> Edit conditional formatting for the column.
This the colours can be changed.
Regards,
Akansh Agarwal -
I have a scenario in which i populate data in table ui thru Rfc call.Now I select a particular row then on clicking of a button the row color should change.how do i change colors of a particular row at runtime?
Note:dont not post blogs of colorful tables.
regards
Nikhil TapkirHi Nikhil,
Check out this link
http://help.sap.com/saphelp_nw04/helpdata/en/0e/23b3c8b0a238439f664f73a04e6332/frameset.htm
Thanks
Anup -
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 -
Using Color Lookup Tables with cwgraph3d
Hi,
When searching old forums and other references, I can only find information regarding using color lookup tables in labview and I am using VB6.
I want to let the user to pick a given amount of colors, have this turned into a gradiant over a table of size 256, and then using the custom colormaptstyle in my 3d graph. I want to be able to change the palette in real time to change my image. Basically I want to have the color palette screen to show up all the time and that gradiant that appears on the right side(vertically) to be my new color lookup table for the image(if that makes any sense).
Thanks. Any help would be greatly appreciated.
Kevin
[email protected]Hello Kevin,
Attached is a small VB6 example that uses the CWGraph3D's ColorMap properties. I think this will demonstrate the color lookup table capability that you're asking about, and you'll be able to use this as a building block for your own application.
David Mc.
NI Applications Engineer
Attachments:
colormap.zip 5 KB
Maybe you are looking for
-
Image Capture downloads pictures and creates .aae file
Using Image Capture 6.6 to download pictures from my iPhone 5S to Macbook Air w/ OSX Yosemite. When I go to the folder where I download the files on my computer, it shows a .JPG file and an .AAE file. I cannot find preferences for Image Capture to tu
-
Does itunes support intel x3100 graphics for watch video and tv shows in itunes: not working
Hi I have a asus p5k-vm motherboard with intel 3100 onboad graphics accelerator. I had a gtx 570 video card install and was using itunes to watch video and tv shows. I sold my gtx 570 and I am using intel x3100 onboard graphics accelerator as my vide
-
Transparent images in reports?
Hello, I am quite sure that this problem has been discussed here before, but I couldn't find a definite answer for it. I am using Reports 10.1.2.3.0 and want to insert an image with a alpha channel into a PDF report. I would like to use a *.png, but
-
Currency Change in New Version ECC 6.0 SR2 - showing as EUR insted of USD
Hi Gurus, I am facing a problem about currency. We are implementing country USA using ECC 6.0 SR2. It is showing EUR in Infotypes 0014, 0015, 0008, 2010 defaultly for all Wage Types, actually it has to show USD for USA country. I checked all the rel
-
Oracle web tier install+config: opmn does not start after install
Centos 5 box. After a silent install of web tier 11.1.1.2 opmn will not start. The installation was "complete" but I found some errors in the various log files. When I try to start a process (for example) using opmn this error occurs in the log file: