Aspect Watermark and Numeric Textbox

Modified: 2009/11/24 00:13 by Jigsaw - Categorized as: Community, Extensions, Gaia 3.5
Edit

Aspect Watermark

A simple Aspect that can be applied to any Textbox.

The Aspect expects two parameters
- The text to display if the Textbox is empty and not being edited
- The Css to apply to the text

For example (c#):

TextBox3.Aspects.Add(new jig.Watermark("some text", "watermark"));

results in the rendering of

Image



Edit

Numeric Textbox (TextBoxMask)

A Textbox that can be configured to prevent entry of non-numeric data. Really useful where you only want numbers entered - like quantity, currency..
Also supports reformatting of the data as focus moves away from the control.

Edit

Key properties:

TextType: Text, Int, Float

DecimalPlaces: how many numbers after the decimal point.
Only applied to TextType Float.
Uses the NumberDecimalSeparator from CurrentCulture.NumberFormat

HasThousandSeperator: bool - do you want a Thousand seperator applied to formatting the data.
Uses the NumberGroupSeparator from CurrentCulture.NumberFormat

FormatOnBlur: bool - should we reformat the data for the OnBlur event

For example:
Image

Results in the rendering of

Image

Edit

Downloads:

You can download a dll or the source

Binary (dll) for v3.5
Source Code for v3.5

Binary (dll) for v3.6
Source code for v3.6

If you notice any improvements, please let me know.

Use them at your own risk. They work fine for me but that is no guarantee they'll work for you.

ScrewTurn Wiki version 2.0.33. Some of the icons created by FamFamFam.