Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » LineEdit, EditFields, DocEdit » Custom check for EditIntXxxx controls
Re: Custom check for EditIntXxxx controls [message #37550 is a reply to message #37549] Tue, 16 October 2012 15:09 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi Pavel,

Edit*Spin ctrls are unfortunately not templates, so I'm afraid it is not really simple to "inject" them with custom value checking code (aside from the default min/max/notNull constraints).

For Edit* ctrls, you can achieve this simply by writing custom Convert based class and declare the type using typedef. E.g. for EditInt with your custom logic:
typedef EditValue<int, MyConvert> MyEditInt;
The input will be marked as invalid if your MyConvert class returns ErrorValue (see docs and/or Core/Convert.h). If you also want the spin buttons, you'll probably have to add them yourself, but it should be easy if you follow the code in original EditIntSpin class.

Best regards,
Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: BUG?: EditString Text rendering not stable with some Strings
Next Topic: need some expert advice to extend the LineEdit
Goto Forum:
  


Current Time: Fri May 03 09:57:10 CEST 2024

Total time taken to generate the page: 0.04571 seconds