2 Replies Latest reply: Jan 29, 2014 1:03 PM by 964914 RSS

Create snapshot of all columns of a tableview including the hidden columns

964914 Newbie
Currently Being Moderated

I am trying to create a snapshot of a tableview. The table view has fixed width on the screen, but can have many columns. When a snapshot of the tableview is taken only the columns which are visible appear in the image, and the remaining columns which are hidden and which needs to scrolled by a scroll bar doesn't appear. How to do this. is this possible. sample code will be of great help.

 

Thanks.

 

 

 

public static WritableImage createSnapShotOfANode(Node node, int width, int height) {
        WritableImage img = new WritableImage(width, height);
        img = node.snapshot(null, img);
        return img;
    }

 

 

 

To this method i am passing a tableview as a node. the width of the tableview as width and height parameter.

 

This only takes the snapshot of the visible columns but not all the columns. I also added the width of all the columns and passed that as the param to the width parameter, but no change.

How to do this.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points