Skip to main content



      Home
Home » Eclipse Projects » NatTable » Freezelayer issue
Freezelayer issue [message #1692038] Sun, 12 April 2015 11:52 Go to next message
Eclipse UserFriend
hi, when I set up freeze column as blow code:
freezeLayer.setTopLeftPosition(0, -1);
freezeLayer.setBottomRightPosition(0, 0);

, the data on tale will show one same column. please see the attachements

So how to hide the first column data?

  • Attachment: Freeze.JPG
    (Size: 184.41KB, Downloaded 132 times)
Re: Freezelayer issue [message #1692103 is a reply to message #1692038] Mon, 13 April 2015 09:24 Go to previous messageGo to next message
Eclipse UserFriend
Execute a FreezeColumnCommand instead of directly access the FreezeLayer.
Re: Freezelayer issue [message #1692117 is a reply to message #1692103] Mon, 13 April 2015 11:07 Go to previous messageGo to next message
Eclipse UserFriend
hI, Thanks your reply. I don't know how to use the FreezeColumnCommand, As I can't found this command example on this website, even in the NatTable example which is download from this website. Please tell me more details how to use it or tell me where this example is.
Re: Freezelayer issue [message #1692128 is a reply to message #1692117] Mon, 13 April 2015 13:43 Go to previous message
Eclipse UserFriend
natTable.doCommand(new FreezeColumnCommand(natTable, 1));


But note that this will only work in case the NatTable is rendered because otherwise the dimensions are not yet initialized.

If you need to set an initial freeze state, you might want to register a listener that unregisters automatically after performing the initial freeze:
PaintListener temp = new PaintListener() {
            @Override
            public void paintControl(PaintEvent e) {
                natTable.doCommand(new FreezeColumnCommand(natTable, 1));
                natTable.removePaintListener(this);
            }
};
natTable.addPaintListener(temp);


Not sure if I showed a different way in the past. Maybe searching the internet helps too.
Previous Topic:How to combine two nattables (so that they appear to be one)
Next Topic:ComboBox value can't be selected
Goto Forum:
  


Current Time: Sun Jul 06 00:58:21 EDT 2025

Powered by FUDForum. Page generated in 0.02892 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top