NullabilityIt is nullable by setting the Value property to null or DBNull. The Text property can also be set to an empty string. When set to null, an optional custom string can be displayed, e.g. "Type to set" or "No data". The user can also force the content to null. It's up to the developer how this is done ("delete" key press, checkbox or another button with text or a custom image). Thisscreencast, demonstrates the feature from the user point-of-view. DatabindingSFPE goes beyond what you expect from DataBinding. The Value and Text properties can, of course, be bound to a data source, but the features do not stop here. Since the component is nullable, there's no problem binding to a nullable column in a grid. Also, each field can be bound independently. This means that the value of the checkbox itself can be controlled by its own boolean column. DataGridView and PropertyGrid integrationA custom editor, implementing IDataGridViewEditingControl, enables you to embed the DateTimePicker in your DataGridView. Your grid gets all the benefits of the editor, including DataBinding with a nullable DateTime column. Thisscreencast (from the initial beta) showcases the perfect integration. If you also have SPG, a custom feel integrates the DateTimePicker into the PropertyGrid. (This fixesthe initial issue of SPG not being able to include the Microsoft DateTimePicker, which is not flexible enough.) Because the BorderStyle can be set to None and the text offset can be changed, SFPE can be embedded in other 3rd party containers. Contact VisualHint if you have specific requirements. Date and time formattingUnlike the legacy DateTimePicker, SFPE handles all the "Standard DateTime Format Strings" and "Custom DateTime Format Strings". This means you can use for example the RFC1123 pattern (code 'R') or the seconds fraction format specifier (e.g. code 'fff'). AppearanceAll the usual properties determine the appearance of the control. Set the font, the foreground and background color when enabled or disabled, the width of the fields as fixed (like Microsoft DateTimePicker) or variable (displayed as a continuous string), and the separator width between them. LocalizableThe DateTimePicker has a CultureInfo property that enables any culture to be set on the control. A totally new MonthCalendar (which can be used free without purchasing SFPE) also adopts this culture. Right to Left languagesSmart FieldPackEditor supports RTL. This is rare among 3rd party components. Here's what an Israeli customer has to say about it:
Built-in buttonsThe DateTimePicker can natively show: a dropdown button, updown buttons and a checkbox. These are independent and can be shown at will. It's also easy to add your own generic button for a custom function. Quick editionEverything has been done to make editing easy for the user:
A TimeSpan editorThere was no real TimeSpan editor for .Net before SFPE, no component letting you input a duration in the format your want. SFPE is now the solution. Flexible format stringThe classical format used by the TimeSpanConverter class or a more versatile format can be used.
Minimum and maximum valuesThe global maximum value will determine the maximum value of the most significant field. For instance, if the max is set to 2 days and you only show hours and minutes, hours can go up to 48. DataGridView and PropertyGrid integrationA custom editor, implementing IDataGridViewEditingControl, enables you to embed the TimeSpan editor in your DataGridView. Your grid gets all the benefits of the editor, including DataBinding with a nullable column. An adapter also enables this editor in Smart PropertyGrid.Net. Features for flexibility and usabilityThis editor is based on SFPE so you get all the great features of this framework. Like the DateTimePicker, it is nullable. It can display an up/down button for convenience. Auto incrementation/decrementation of the TimeSpan value can happen when a field goes from max to min or vice versa (for instance, 59 seconds incremented to 0 seconds will add a minute to the value). You get a notification when a field is created or reconfigured. This lets you, for example, change a static field from singular to plural. A base frameworkSFPE is a generic field editor. The base class, FieldPackEditor, is made of field packs, logical units capable of storing a value such as a latitude. Each pack is made of fields, for example the latitude "minute" field . Derive from the pack and field base classes to create the content of a specialized editor. Derive from FieldPackEditor to create a complete solution with methods and properties pertaining to this editor. SFPE supports the following native features (those mentioned for the DateTimePicker are not repeated here): Control of the dropdown windowTake complete control of the dropdown window (unlike with the Microsoft DateTimePicker). Use an API to open and close the popup as required, and to define its content. For example, change the default month calendar in the DateTimePicker or display a Google map under a latitude/longitude editor. Management of packs and fieldsManage packs and fields at will. Since they have unique identifiers, you can get a reference on one of them, then perform an operation on it such as selecting it, setting it as read only, or changing its culture or min/max values. Once you get a field, it's easy to navigate to the other fields. Flexible keyboard managementManage keys at the editor, pack and field levels, easily changing default behaviours. Packs and fields can specify the keys they accept. For example Ctrl+Home will be filtered by the pack (it resets a date to today for example) whereas a digit will be understood by a numeric field. A special mention for the TAB key: you can let it browse by fields, packs or nothing - handy, for example, for jumping from anywhere in the latitude pack to the first field in the longitude pack. Numeric fieldsRapidly create your own editable numeric fields using a specially defined NumericField base class. TextboxableThis term means that by the click of a button, the user can replace the editor with a textbox. Use it at your convenience, for example to input a hostname instead of an IP address, an airport code instead of its reference point or a keyword like "yesterday" instead of a date. Other specialized editorsTo showcase its possibilities, SFPE comes with two ready-to-use editors: an IP address editor, useful in any network type application, and a latitude/longitude editor, useful in any GIS or similar application. These controls benefit from all above mentioned features. |