Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Hex cell editor(How to create a text box cell that only allows hexadecimal entry)
Hex cell editor [message #1061237] Thu, 30 May 2013 16:46 Go to next message
desis machino is currently offline desis machinoFriend
Messages: 10
Registered: May 2013
Junior Member
I am trying to use nattable for a view where the values users are hexadecimal. I want to restrict the valid keys that users can enter (0-9,A-F) rather then giving an error if users type invalid values. Should I start with extending the TextCellEditor and capturing key stroke events to only allow the characters I want? I also want to have a mask in the value (ie an '_' every 4 nibbles, like DEAD_BEEF) so if users type more than 4 characters it will automatically appear for them. Is the class extending TextCellEditor where I should begin looking to make my changes?

Are there any examples of anything like this that anyone knows of that I can look at to help me get started.

Re: Hex cell editor [message #1061250 is a reply to message #1061237] Thu, 30 May 2013 18:46 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2771
Registered: July 2012
Senior Member

I'm not sure if anybody did something like that before in NatTable.

Yes I would try to extend the TextCellEditor and add additional key listeners. The TextCellEditor just wraps the Text Control, so maybe there is somebody out there who did something similar with a SWT Text Control.

Previous Topic:How to contribute my changes of nattable builder api formally by sending a review?
Next Topic:Issue with tree grid in 1.0.0
Goto Forum:

Current Time: Sat Jan 18 19:51:11 GMT 2020

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

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

Back to the top