Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Freezelayer issue
Freezelayer issue [message #1692038] Sun, 12 April 2015 15:52 Go to next message
Su Shine is currently offline Su ShineFriend
Messages: 2
Registered: April 2015
Junior Member
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 103 times)
Re: Freezelayer issue [message #1692103 is a reply to message #1692038] Mon, 13 April 2015 13:24 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Execute a FreezeColumnCommand instead of directly access the FreezeLayer.
Re: Freezelayer issue [message #1692117 is a reply to message #1692103] Mon, 13 April 2015 15:07 Go to previous messageGo to next message
Su Shine is currently offline Su ShineFriend
Messages: 2
Registered: April 2015
Junior Member
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 17:43 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
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: Thu Apr 25 14:24:31 GMT 2024

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

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

Back to the top