TableView columns headers customization using CSS

Hi,
I'm trying to customize the TableView columns headers using CSS, but up until now, I was not able to find the CSS class name for the previously mentioned elements.
Can anyone point me to a document or link where I can find all the available CSS classes for TableView and, why not for all the JAVA FX 2.0 widgets.
Thanks,
Alin

Here's the Oracle CSS Reference guide for JavaFX:
http://docs.oracle.com/javafx/2.0/api/javafx/scene/doc-files/cssref.html#tableview
You can also look at caspian.css inside the javafx runtime as it is the default CSS sheet for JavaFX applications and is a good place to see a lot of the style classes in use. The particular class you want is .table-view .column-header{} for individual columns or .table-view .column-header-background{} for the whole table header in general. Hope that helps.

Similar Messages

  • TableView column headers do not line up with rows

    Right now I have a tableview with column headers that are wider than the cells in the rows of the table.
    Anyone know what property or css style I need to adjust to give the cells a little more padding? I have not had any luck searching the web or these forums.
    Edited by: astep on Feb 26, 2013 6:59 AM

    Sorry it took me a little bit to strip things down and create the project. I used NetBeans to reproduce the effect and I tried to follow the same pattern in case it had a side effect. Sorry there is so much code here for such a simple demo. I'm going to play around with it some to see if removing some of the css eliminates the effect.
    Sample.fxml
    <?xml version="1.0" encoding="UTF-8"?>
    <?import java.lang.*?>
    <?import java.util.*?>
    <?import javafx.scene.*?>
    <?import javafx.scene.control.*?>
    <?import javafx.scene.layout.*?>
    <AnchorPane fx:id="ConstraintsAnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="460.0" prefWidth="480.0" style="-fx-background-color:black" xmlns:fx="http://javafx.com/fxml" fx:controller="testtableview.SampleController">
      <children>
        <TitledPane fx:id="ConstraintsTitlePane" alignment="CENTER" animated="false" collapsible="false" contentDisplay="CENTER" opacity="0.75" text="Constraints by Stream Class">
          <content>
            <TableView fx:id="constraintsTableView" prefHeight="445.0" prefWidth="480.0" />
          </content>
        </TitledPane>
      </children>
    </AnchorPane>stylesheet.css
    .root {
    -fx-base: rgb(50, 50, 50);
    -fx-background: rgb(50, 50, 50);
    -fx-control-inner-background:  rgb(50, 50, 50);
    .table-view {
    -fx-table-cell-border-color:derive(-fx-base,+10%);
    -fx-table-header-border-color:derive(-fx-base,+20%);
    .text-field{
         -fx-prompt-text-fill: White;
    .table-cell {
         -fx-border-color: black;
    .table-cell:hover {
         -fx-background: DimGray;
         -fx-background-color: DimGray;
    .table-cell:selected {
         -fx-background: DimGray;
         -fx-background-color: DimGray;
    .table-row-cell {
         -fx-border-color: black;
         -fx-control-inner-background: black;
    .table-row-cell:hover {
         -fx-background: DimGray;
         -fx-background-color: DimGray;
    .table-row-cell:selected {
         -fx-background: DimGray;
         -fx-background-color: DimGray;
    }TestTableView.java
    package testtableview;
    import javafx.application.Application;
    import javafx.fxml.FXMLLoader;
    import javafx.scene.Parent;
    import javafx.scene.Scene;
    import javafx.stage.Stage;
    public class TestTableView extends Application {
        @Override
        public void start(Stage stage) throws Exception {
            Parent root = FXMLLoader.load(getClass().getResource("Sample.fxml"));
            Scene scene = new Scene(root);
            stage.setScene(scene);
            scene.getStylesheets().add(TestTableView.class.getResource("stylesheet.css").toExternalForm());
            stage.show();
        public static void main(String[] args) {
            launch(args);
    }Model.java
    package testtableview;
    import javafx.beans.property.SimpleStringProperty;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    public class Model {
         private static Constraint temp = new Constraint();
         private static Model instance = null;
         private Model() {
         public static Model getInstance() {
              if (instance == null) {
                   instance = new Model();
                   constraintsList.add(temp);
              return instance;
         private static ObservableList<Constraint> constraintsList = FXCollections
                   .observableArrayList();
         public ObservableList<Constraint> getConstraintsList() {
              return constraintsList;
         public static class Constraint {
              private SimpleStringProperty ColumnOne = null;
              private SimpleStringProperty ColumnTwo = null;
              private SimpleStringProperty ColumnThree = null;
              private SimpleStringProperty ColumnFour = null;
              private SimpleStringProperty ColumnFive = null;
              private SimpleStringProperty ColumnSix = null;
              private SimpleStringProperty ColumnSeven = null;
              public String getColumnOne() {
                   return ColumnOne.get();
              public void setColumnOne(String input) {
                   ColumnOne.set(input);
              public String getColumnTwo() {
                   return ColumnTwo.get();
              public void setColumnTwo(String input) {
                   ColumnTwo.set(input);
              public String getColumnThree() {
                   return ColumnThree.get();
              public void setColumnThree(String input) {
                   ColumnThree.set(input);
              public String getColumnFour() {
                   return ColumnFour.get();
              public void setColumnFour(String input) {
                   ColumnFour.set(input);
              public String getColumnFive() {
                   return ColumnFive.get();
              public void setColumnFive(String input) {
                   ColumnFive.set(input);
              public String getColumnSix() {
                   return ColumnSix.get();
              public void setColumnSix(String input) {
                   ColumnSix.set(input);
              public String getColumnSeven() {
                   return ColumnSeven.get();
              public void setColumnSeven(String input) {
                   ColumnSeven.set(input);
              public Constraint() {
                   this.ColumnOne = new SimpleStringProperty("");
                   this.ColumnTwo = new SimpleStringProperty("");
                   this.ColumnThree = new SimpleStringProperty("");
                   this.ColumnFour = new SimpleStringProperty("");
                   this.ColumnFive = new SimpleStringProperty("");
                   this.ColumnSix = new SimpleStringProperty("");
                   this.ColumnSeven = new SimpleStringProperty("");
    }ConstraintsTableViewModel.java
    package testtableview;
    import testtableview.Model.Constraint;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.cell.PropertyValueFactory;
    public class ConstraintsTableViewModel {
         private static TableView<Constraint> table = new TableView<Constraint>();
         private static ObservableList<TableColumn<Constraint, String>> columnList = FXCollections
                   .observableArrayList();
         public static TableView<Constraint> setupView() {
              TableColumn<Constraint, String> ColumnOneCol = new TableColumn<Constraint, String>("Example Exam1");
              ColumnOneCol.setMinWidth(95.0);
              ColumnOneCol.setCellValueFactory(new PropertyValueFactory<Constraint, String>("ColumnOne"));
              columnList.add(ColumnOneCol);
              TableColumn<Constraint, String> ColumnTwoCol = new TableColumn<Constraint, String>("Example 2");
              ColumnTwoCol.setMinWidth(55.0);
              ColumnTwoCol.setCellValueFactory(new PropertyValueFactory<Constraint, String>("ColumnTwo"));
              columnList.add(ColumnTwoCol);
              TableColumn<Constraint, String> ColumnThreeCol = new TableColumn<Constraint, String>("Example3");
              ColumnThreeCol.setCellValueFactory(new PropertyValueFactory<Constraint, String>("ColumnThree"));
              ColumnThreeCol.setMinWidth(70);
              columnList.add(ColumnThreeCol);
              TableColumn<Constraint, String> ColumnFourCol = new TableColumn<Constraint, String>("Example4");
              ColumnFourCol.setMinWidth(60.0);
              ColumnFourCol.setCellValueFactory(new PropertyValueFactory<Constraint, String>("ColumnFour"));
              columnList.add(ColumnFourCol);
              TableColumn<Constraint, String> ColumnFiveCol = new TableColumn<Constraint, String>("Example5");
              ColumnFiveCol.setMinWidth(60.0);
              ColumnFiveCol.setCellValueFactory(new PropertyValueFactory<Constraint, String>("ColumnFive"));
              columnList.add(ColumnFiveCol);
              TableColumn<Constraint, String> ColumnSixCol = new TableColumn<Constraint, String>("Example6");
              ColumnSixCol.setCellValueFactory(new PropertyValueFactory<Constraint, String>("ColumnSix"));
              ColumnSixCol.setMinWidth(55);
              columnList.add(ColumnSixCol);
              TableColumn<Constraint, String> ColumnSevenCol = new TableColumn<Constraint, String>("Exam7");
              ColumnSevenCol.setCellValueFactory(new PropertyValueFactory<Constraint, String>("ColumnSeven"));
              ColumnSevenCol.setMinWidth(55);
              columnList.add(ColumnSevenCol);
              table.getColumns().addAll(columnList);
              return table;
    }SampleController.java
    package testtableview;
    import testtableview.Model.Constraint;
    import java.net.URL;
    import java.util.ResourceBundle;
    import javafx.fxml.FXML;
    import javafx.fxml.Initializable;
    import javafx.scene.control.TableView;
    public class SampleController implements Initializable {
        @FXML
         private TableView<Constraint> constraintsTableView;
         private Model cm = null;
        @Override
        public void initialize(URL url, ResourceBundle rb) {
            cm = Model.getInstance();
         constraintsTableView.setItems(cm.getConstraintsList());
         constraintsTableView.getColumns().addAll(ConstraintsTableViewModel.setupView().getColumns());
    }

  • Column header customization using rowspan and colspan

    Hi,
    I want to implement customized column header using rowspan and colspan.
    This can be done in html easily but not sure how I can implement in HTML DB.
    Anybody has idea?
    Thanks in advance,
    <table border="1">
    <!-- begin header -->
    <tr>
    <td rowspan="2">COL1</td>
    <td rowspan="2">COL2</td>
    <td rowspan="2">COL3</td>
    <td colspan="3">COL4</td>
    <td colspan="3">COL5</td>
    </tr>
    <tr>
    <td>COL4-1</td>
    <td>COL4-2</td>
    <td>COL4-3</td>
    <td>COL5-1</td>
    <td>COL5-2</td>
    <td>COL5-3</td>
    </tr>
    <!-- begin data -->
    <tr>
    <td>VALUE1</td>
    <td>VALUE2</td>
    <td>VALUE3</td>
    <td>VALUE4-1</td>
    <td>VALUE4-2</td>
    <td>VALUE4-3</td>
    <td>VALUE5-1</td>
    <td>VALUE5-2</td>
    <td>VALUE5-3</td>
    </tr>
    </table>

    Thanks Raj,
    you'd want to do this kind of formatting from your report template. we have a technote out on report templates at...
    http://www.oracle.com/technology/pub/notes/technote_htmldb_format.html
    ...and, so you know, you'd want to enter your custom col header html into the "Before Rows" field of your template definition screen (kinda like step 8 that's above Figure 5 in the technote).
    hope this helps,
    raj

  • Export data to excel and table column headers

    I noticed that with LV 2012 when I call the method "Export Data to Excel" for a table, the table headers (= column names) are not exported to excel.
    Am I right? I think that the column names should be exported too...
    As a matter of fact when you call the method "Export to simplified image" the column names are included
    How can I export the table column names to excel?
    Vix
    In claris non fit interpretatio
    Using LV 2013 SP1 on Win 7 64bit
    Using LV 8.2.1 on WinXP SP3
    Using CVI 2012 SP1 on Win 7 64bit, WinXP and WinXP Embedded
    Using CVI 6.0 on Win2k, WinXP and WinXP Embedded

    In this document there is a full description of how to export data from LabVIEW to Excel.
    Using a table, the method "Export data to excel" should export the "currently selected data", and data can be programmatically selected using ActiveCell property (as described here).
    With ActiveCell I can select the column headers too (using negative numbers for row and/or column), and I do this.
    And so I expect that when I select "Export data to Excel", the column headers should be exported too (because I selected them!).
    I think that the actual behavior is a bug, rather that an expected behavior.
    Don't you agree?
    Vix
    In claris non fit interpretatio
    Using LV 2013 SP1 on Win 7 64bit
    Using LV 8.2.1 on WinXP SP3
    Using CVI 2012 SP1 on Win 7 64bit, WinXP and WinXP Embedded
    Using CVI 6.0 on Win2k, WinXP and WinXP Embedded

  • Freeze the column headers for htmlb:tableView using CSS

    Hi
    I am using a <htmlb:tableView > in BSP to display data.
    i want to freeze the column headers so that they dont scroll when table data is scrolled.
    Is it possible ?
    Regards
    Rajendra

    Hi Rajendra,
    Have a look at the links below:
    [Freeze tableview header-I|https://forums.sdn.sap.com/click.jspa?searchID=24813847&messageID=3088768]
    [Freeze tableview header-II|Freeze table header in HTMLB Tableview]
    [Freeze Columns of tableview|https://forums.sdn.sap.com/click.jspa?searchID=24813847&messageID=3517748]
    Search the forum and you will find information on this.
    Regards,
    Anubhav

  • How can I customize the Column Headers of the TABLE control/indicator in LabVIEW ?

    I need to customize the TABLE control/indicator in the LabVIEW as the same shape of the table in the LabWindows CVI or the DBgrid of the Borland Delphi. Where can I modify the color and shape of the Column Headers and the Row Headers.
    Thanks,
    Cleber

    Salutations,
    You asked this question about 3 months ago, and no one answered it.. How rude of them, well....
    You can customize any control/indicator by right mouse clicking on it, going to advanced, then customize. If you want to color it, you can always right mouse click with the shift key down, and pull up the painting tool stuff. Or use the tab key if you want to scroll through tools. I believe it's the tab key. Alright, i bet you've long since figured it out, but i couldn't resist.
    Sincerely,
    ElSmitho

  • Tableview - Freeze column headers

    Dear experts,
    Working with a BSP page to display a very big tableusing tableview. Currently the header scrolls out of visible area when user scrolls down the table. Is there a way to freeze the column headers?
    SR

    Hi Srini,
    Welcome to S.D.N.
    Well there is one way of doing it that i know of is using StyleSheets...
    Refer to <a href="http://web.tampabay.rr.com/bmerkey/examples/locked-column-csv.html">http://web.tampabay.rr.com/bmerkey/examples/locked-column-csv.html</a>.
    Also refer to <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/4e/7feef553415e4fb357e80f7a6223b1/frameset.htm">Setting stylesheets- SAP Help</a>
    Hope this helps..
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • How to make column headers in table in PDF report appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp

    Hi my name is vishal
    For past 10 days i have been breaking my head on how to make column headers in table appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp.
    Given below is my code in c# on how i export datas from different tables in sql server to PDF report using iTextSharp:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    using System.Diagnostics;
    using System.IO;
    namespace DRRS_CSharp
    public partial class frmPDF : Form
    public frmPDF()
    InitializeComponent();
    private void button1_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(6);
    table.TotalWidth =530f;
    table.LockedWidth = true;
    PdfPCell cell = new PdfPCell(new Phrase("Institute/Hospital:AIIMS,NEW DELHI", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK)));
    cell.Colspan = 6;
    cell.HorizontalAlignment = 0;
    table.AddCell(cell);
    Paragraph para=new Paragraph("DCS Clinical Record-Assigned Dialyzer",FontFactory.GetFont("Arial",16,iTextSharp.text.Font.BOLD,BaseColor.BLACK));
    para.Alignment = Element.ALIGN_CENTER;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(105f, 105f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn = new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select d.dialyserID,r.errorCode,r.dialysis_date,pn.patient_first_name,pn.patient_last_name,d.manufacturer,d.dialyzer_size,r.start_date,r.end_date,d.packed_volume,r.bundle_vol,r.disinfectant,t.Technician_first_name,t.Technician_last_name from dialyser d,patient_name pn,reprocessor r,Techniciandetail t where pn.patient_id=d.patient_id and r.dialyzer_id=d.dialyserID and t.technician_id=r.technician_id and d.deleted_status=0 and d.closed_status=0 and pn.status=1 and r.errorCode<106 and r.reprocessor_id in (Select max(reprocessor_id) from reprocessor where dialyzer_id=d.dialyserID) order by pn.patient_first_name,pn.patient_last_name", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("Reprocessing Date");
    table.AddCell("Patient Name");
    table.AddCell("Dialyzer(Manufacturer,Size)");
    table.AddCell("No.of Reuse");
    table.AddCell("Verification");
    table.AddCell("DialyzerID");
    while (dr.Read())
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString() +"_"+ dr[4].ToString());
    table.AddCell(dr[5].ToString() + "-" + dr[6].ToString());
    table.AddCell("@count".ToString());
    table.AddCell(dr[12].ToString() + "-" + dr[13].ToString());
    table.AddCell(dr[0].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    System.Diagnostics.Process.Start("AssignedDialyzer.pdf");
    if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
    var writer2 = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    else if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.No)
    this.Close();
    The above code executes well with no problem at all!
    As you can see the file to which i create and save and open my pdf report is
    AssignedDialyzer.pdf.
    The column headers of table in pdf report from c# windows forms using iTextSharp are
    "Reprocessing Date","Patient Name","Dialyzer(Manufacturer,Size)","No.of Reuse","Verification" and
    "DialyzerID".
    However the problem i am facing is after execution and opening of document is my
    column headers in table in pdf report from
    c# and datas in it all appear in bold.
    I have browsed through net regarding to solve this problem but with no success.
    What i want is my pdf report from c# should be similar to following format which i was able to accomplish in vb6,adodb with MS access using iTextSharp.:
    Given below is report which i have achieved from vb6,adodb with MS access using iTextSharp
    I know that there has to be another way to solve my problem.I have browsed many articles in net regarding exporting sql datas to above format but with no success!
    Is there is any another way to solve to my problem on exporting sql datas from c# windows forms using iTextSharp to above format given in the picture/image above?!
    If so Then Can anyone tell me what modifications must i do in my c# code given above so that my pdf report from c# windows forms using iTextSharp will look similar to image/picture(pdf report) which i was able to accomplish from
    vb6,adodb with ms access using iTextSharp?
    I have approached Sound Forge.Net for help but with no success.
    I hope anyone/someone truly understands what i am trying to ask!
    I know i have to do lot of modifications in my c# code to achieve this level of perfection but i dont know how to do it.
    Can anyone help me please! Any help/guidance in solving this problem would be greatly appreciated.
    I hope i get a reply in terms of solving this problem.
    vishal

    Hi,
    About iTextSharp component issue , I think this case is off-topic in here.
    I suggest you consulting to compenent provider.
    http://sourceforge.net/projects/itextsharp/
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Unable to turn column headers bold in Word table using VB Script

    I have created a table in Microsoft Word 2010 using VB Script (this is via the script engine that forms part of HP Quality Centre functionality).  The table itself is OK, 2 columns with centred headers.  However, I am unable to make the column
    headers bold.  I have spent hours searching the net and trying various options to no avail can somebody please help me.
    Set objWord = CreateObject("Word.Application")
    Set objDocument = objword.Documents.Open(Src_Dir & template_file
    Const wdAlignParagraphCenter = 1'var to control justification of the table columns
    Const NUMBER_OF_ROWS = 1 'number of rows in intial table
    Const NUMBER_OF_COLUMNS = 2 'number of colums in the intitial table
    'search for the "TAA_TABLE" bookmark embedded in the document template, this is where the table will be created
    Set objRange=objDocument.Bookmarks("TAA_TABLE").Range
    'create the table
    objDocument.Tables.Add objRange, NUMBER_OF_ROWS, NUMBER_OF_COLUMNS
    Set objTable = objDocument.Tables(2)
    'populate column headers
    objTable.Cell(1, 1).Range.Font.Bold = True
    objTable.Cell(1, 1).Range.Text = "Sub Contractor"
    objTable.Cell(1, 2).Range.text = "TAA Number"
    'centre the column headers
    objDocument.Tables(2).Rows(1).Select
    Set objSelection = objWord.Selection
    objSelection.ParagraphFormat.Alignment = wdAlignParagraphCenter
    'format the table with plain grid lines
    objTable.AutoFormat(16)
    'set the column widths
    objTable.Columns(1).Setwidth 230,0
    objTable.Columns(2).Setwidth 230,0
    Any help is graetfully appreciated, as this is driving me wild.
    Cheers,

    Hi Citronax,
    I haved noticed that you used objTable.AutoFormat to format the table. Based on my understanding, this fuction will applie a predefined look to a table.
    After I move the code which bolder the text behind this line of code, it works well for me.
    'format the table with plain grid lines
    objTable.AutoFormat (16)
    objTable.Cell(1, 1).Range.Font.Bold = True
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • JTable column headers not displaying using custom table model

    Hi,
    I'm attempting to use a custom table model (by extending AbstractTableModel) to display the contents of a data set in a JTable. The table is displaying the data itself correctly but there are no column headers appearing. I have overridden getColumnName of the table model to return the correct header and have tried playing with the ColumnModel for the table but have not been able to get the headers to display (at all).
    Any ideas?
    Cheers

    Class PublicationTableModel:
    public class PublicationTableModel extends AbstractTableModel
        PublicationManager pubManager;
        /** Creates a new instance of PublicationTableModel */
        public PublicationTableModel(PublicationManager pm)
            super();
            pubManager = pm;
        public int getColumnCount()
            return GUISettings.getDisplayedFieldCount();
        public int getRowCount()
            return pubManager.getPublicationCount();
        public Class getColumnClass(int columnIndex)
            Object o = getValueAt(0, columnIndex);
            if (o != null) return o.getClass();
            return (new String()).getClass();
        public String getColumnName(int columnIndex)
            System.out.println("asked for column name "+columnIndex+" --> "+GUISettings.getColumnName(columnIndex));
            return GUISettings.getColumnName(columnIndex);
        public Publication getPublicationAt(int rowIndex)
            return pubManager.getPublicationAt(rowIndex);
        public Object getValueAt(int rowIndex, int columnIndex)
            Publication pub = (Publication)pubManager.getPublicationAt(rowIndex);
            String columnName = getColumnName(columnIndex);
            if (columnName.equals("Address"))
                if (pub instanceof Address) return ((Address)pub).getAddress();
                else return null;
            else if (columnName.equals("Annotation"))
                if (pub instanceof Annotation) return ((Annotation)pub).getAnnotation();
                else return null;
            etc
           else if (columnName.equals("Title"))
                return pub.getTitle();
            else if (columnName.equals("Key"))
                return pub.getKey();
            return null;
        public boolean isCellEditable(int rowIndex, int colIndex)
            return false;
        public void setValueAt(Object vValue, int rowIndex, int colIndex)
        }Class GUISettings:
    public class GUISettings {
        private static Vector fields = new Vector();
        private static Vector classes = new Vector();
        /** Creates a new instance of GUISettings */
        public GUISettings() {
        public static void setFields(Vector f)
            fields=f;
        public static int getDisplayedFieldCount()
            return fields.size();
        public static String getColumnName(int columnIndex)
            return (String)fields.elementAt(columnIndex);
        public static Vector getFields()
            return fields;
    }GUISettings.setFields has been called before table is displayed.
    Cheers,
    garsher

  • Column Headers in Excel using CLIENT_OLE2

    Hello guys,
    I have muti record block that has 10 columns which I want to display in Excel. I created a procedure RUN_EXCEL and everything works fine when the button is pressed and the procedure is called. However, I want to add the column prompts and when I try to do that using the prompt text I get the column headers but all the rows and colums mess up. Can anyone tell me how to get the column header to work to add in my current procedure. Right now if I run this way it doesn't display the promt headers.
    Thanks
    PROCEDURE RUN_EXCEL IS
    application Client_OLE2.Obj_Type;
    workbooks Client_OLE2.Obj_Type;
    workbook Client_OLE2.Obj_Type;
    worksheets Client_OLE2.Obj_Type;
    worksheet Client_OLE2.Obj_Type;
    args Client_OLE2.List_Type;
    cell client_ole2.Obj_Type;
    font client_ole2.obj_type;
    range client_ole2.obj_type;
    range_col client_ole2.obj_type;
    item_prompt VARCHAR2(32767);
    j INTEGER;
    k INTEGER;
    l INTEGER;
    BEGIN
    application := Client_OLE2.create_obj('Excel.Application');
    Client_OLE2.Set_Property ( application , 'visible', 1);
    workbooks := Client_OLE2.Get_Obj_Property(application, 'Workbooks');
    workbook := Client_OLE2.Invoke_Obj(workbooks, 'Add');
    worksheets := Client_OLE2.Get_Obj_Property(workbook, 'Worksheets');
    worksheet := Client_OLE2.Invoke_Obj(worksheets, 'Add');
    go_block('DM_T_EXCEPTION_LOG');
    first_record;
    j:=1;
    k:=1;
    while :system.last_record = 'FALSE'
    loop
    for k in 1..10 /* Table has 10 columns */
    loop
    If not name_in(:system.cursor_item) is NULL Then
         item_prompt := get_item_property(:SYSTEM.CURRENT_BLOCK||'.'||:SYSTEM.CURRENT_ITEM, prompt_text);
    args:=Client_OLE2.create_arglist;
    Client_OLE2.add_arg(args, j);
    Client_OLE2.add_arg(args, k);
    cell:=Client_OLE2.get_obj_property(worksheet, 'Cells', args);
    Client_OLE2.destroy_arglist(args);
    Client_OLE2.set_property(cell, 'Value', name_in(:system.cursor_item));
    Client_OLE2.release_obj(cell);
    range := client_ole2.get_obj_property (worksheet, 'UsedRange');
    range_col := client_ole2.get_obj_property (range, 'Columns');
    client_ole2.invoke (range_col, 'AutoFit');
    End If;
    next_item;
    end loop;
    j:=j+1;
    next_record;
    end loop;
    /* For the last record */
    for k in 1..10
    loop
    If not name_in(:system.cursor_item) is NULL Then
    args:=Client_OLE2.create_arglist;
    Client_OLE2.add_arg(args, j);
    Client_OLE2.add_arg(args, k);
    cell:=Client_OLE2.get_obj_property(worksheet, 'Cells', args);
    Client_OLE2.destroy_arglist(args);
    Client_OLE2.set_property(cell, 'Value', name_in(:system.cursor_item));
    -- imessage('in k again'||' '||:system.cursor_item||' '||item_prompt);
    Client_OLE2.release_obj(cell);
    range := client_ole2.get_obj_property (worksheet, 'UsedRange');
    range_col := client_ole2.get_obj_property (range, 'Columns');
    client_ole2.invoke (range_col, 'AutoFit');
    End If;
    next_item;
    end loop;
    ole2.set_property(application, 'Visible', 'false');
    client_ole2.release_obj (range);
    client_ole2.release_obj (range_col);
    Client_OLE2.Release_Obj(worksheet);
    Client_OLE2.Release_Obj(worksheets);
    END;

    Re:  Problem area in code
    "Match" is a worksheet function and is not used in VBA unless it is identified as a worksheet function, such as...
      X = Application.WorksheetFunction.Match(arg, arg, arg)
    Jim Cone
    Portland, Oregon USA
    free 'Save Selection as Picture' excel add-in
    (a couple of clicks & you have a picture file of the selected cells)
    https://jumpshare.com/b/O5FC6LaBQ6U3UPXjOmX2

  • How to group the column headers using WDA ALV ?

    Hello All.
    How can I group the column headers as shown in the picture(chart), using  WDA  ALV.
    Thanks for any help !
    A
    B
    A1
    A2
    A3
    A4
    B1
    B2
    B3
    B4
    B11
    B12
    B13
    B21
    B22
    B23
    B31
    B32
    B33
    B41
    B42
    B43
    消息编辑者为:Cloud Li

    Hi ,
    This functionality was not exposed/supported in WDP ALV,however the same can be achieved in normal table(table UI element)
    The reason this isn't exposed directly in the ALV is because it is used internally when you do a grouped sort.  The ALV automatically buids group headers to explain the grouped sort/sum.
    Depending upon your requirements if you must have the group header and aren't using much else in the ALV, you might be better off using the plain old table. Below is a link to how to do group headers in the table UI element.
    Table
    Hope this helps you.
    Thanks
    KH

  • Discoverer Export Problem - Column headers dropped & row data used instead

    In Discoverer 9i, when I export the data for a 12 month period from one of my workbooks to Excel 2002, three of the twelve column headers are dropped in the spreadsheet and one piece of row data is used as a column header instead. The total number of records exported for the workbook is 33586 which is below the export limit for Excel. This problem does not happen when 11 months of data (28174 rows) is exported out to Excel. Any idea what may be causing this?
    Regards,
    Andrew

    pallen,
    As usual the Express VI has its limitations.  It seems to be setup for a 2D array of info in this case.  The best way I've found is to name range in template and use the Excel Easy Table.vi.

  • Three columns using css

    I really like using CSS to layout a page or add to an
    existing page. I want to line up three equal size columns using CSS
    instead of having a table. See this page for an example of the
    first column. I tried to position the second column #test3 in css
    but it stays underneath the first column. Any tips are greatly
    appreciated.
    www.diabloshores.com/test2.html

    "sheridany" <[email protected]> wrote in
    message
    news:g0fa8p$nvm$[email protected]..
    >I really like using CSS to layout a page or add to an
    existing page. I
    >want to
    > line up three equal size columns using CSS instead of
    having a table. See
    > this
    > page for an example of the first column. I tried to
    position the second
    > column
    > #test3 in css but it stays underneath the first column.
    Any tips are
    > greatly
    > appreciated.
    >
    > www.diabloshores.com/test2.html
    The demo:
    http://www.tjkdesign.com/articles/css-layout/no_div_no_float_no_clear_no_hack_no_joke.asp
    The tutorial:
    http://www.tjkdesign.com/articles/float-less_css_layouts.asp
    Thierry
    Articles and Tutorials:
    http://www.TJKDesign.com/go/?0
    Keep your markup *clean* with these DW extensions and
    scripts:
    http://www.divahtml.com/products/scripts_dreamweaver_extensions.php

  • Organising text into columns using CSS?

    Hello again guys,
    Another day another problem.
    This community has been really friendly and helpful so far with what I'm sure must appear to many of you to be really simply problems, so I'm hoping that you can bear with me and help me out again!
    Basically, I'm designing my page using CSS, and I've come to a part where I would like to have 3 columns of text, of a fixed width, with a fixed gap in between. Using my very limited knowledge and experience, I inputted the code that I thought would work, but whenever I go to enter more text, it doesn't jump to a new line when it reaches the maximum width of the column, it carries on on the same line and pushes the rest of the text across.
    How do I sort this out?
    I can't actually upload my site until Monday, but I've included some screen below which I hope will help.
    Thanks again guys.
    Text in columns:
    http://i51.tinypic.com/2s9vyhg.png
    When I type some more, it doesn't stay in the column width:
    http://i55.tinypic.com/dlno7b.png
    The code that I thought would work:
    http://i54.tinypic.com/yjoed.png
    http://i56.tinypic.com/2dax46c.png

    Hi Murray,
    Apologies. I had made a mistake. I've got it working now. Thank you.
    Another tiny thing, if you check out this screen:
    http://i54.tinypic.com/elcep.png
    you can see that the line starts right near the top, and goes all the way down to the bottom.
    Is there some way to amend the code that you gave me to adjust the height of the line? I tried adjusting the size of the image but that didn't seem to have an effect?
    Ideally, I would like to line at the top of the 'T' of 'This is a news story', and finish at the bottom of the 'M' of 'More'. That height.
    Something else which has confused me. I have that 'More' link aligned to the right, and in my design view in DW it is so aligned, but then when I preview the page, it jumps to the left hand side of each column. The alignment seems to disappear when the page is 'live'?
    Thanks again for all of your help. You really are a star!

Maybe you are looking for