|Re: any guidance to create custom textbox that extends SWT textbox [message #915549 is a reply to message #913240]
||Mon, 17 September 2012 14:06
| Grant Gayed
Registered: July 2009
This does not sound any different, a Verify listener is still the best |
way to do this. You can create one and hook it on whichever Texts have
these input constraints. If you want this to happen more seamlessly
(ie.- so that every "new Text(...)" does not need an accompanying
"text.addListener(SWT.Verify...)") then the typical "nice" approach is
to create a Factory class that creates your Texts and adds the Verify
If you really really want to subclass Text then see
On 9/14/2012 11:43 PM, sam mn wrote:
> Thanks for the reply Grant.
> However my scenario is like this:
> We have a RCP app and there are a lot of places where we have already
> created text boxes and expecting more textboxes added in future. Now,
> these textboxes need to validate for certain characters that should not
> be allowed.
> Our idea was to create a custom text widget and let current text boxes
> be the new custom text widget and future textboxes also use this custom
> text widget so that our validation added to this custom text widget work.
Powered by FUDForum
. Page generated in 0.07367 seconds