FIELDWIDGET__DEFINE Name
FIELDWIDGET__DEFINE
Purpose
The purpose of this routine is to create an object widget similar to FSC_FIELD
(which is itself similar to CW_FIELD).
Authors
FANNING SOFTWARE CONSULTING BURRIDGE COMPUTING
1645 Sheely Drive 18 The Green South
Fort Collins Warborough, Oxon
CO 80526 USA OX10 7DN, ENGLAND
Phone: 970-221-0438 Phone: +44 (0)1865 858279
E-mail: davidf@dfanning.com E-mail: davidb@burridgecomputing.co.uk
Category
Objects. Syntax
theObject = Obj_New("FIELDWIDGET")
Superclasses
BASEWIDGET
WIDGETATOM
CATATOM
CATCONTAINER IDLITCOMPONENT
IDL_CONTAINER Class Structure
class = { FIELDWIDGET, $
_event_handler: Obj_New(), $ ; The real event handler object or objects for this compound object.
_event_method_real: "", $ ; The event method assigned by the user to this object widget.
cr_events: 0L, $ ; A flag meaning send carriage return events.
datatype: "" , $ ; The type of data to be returned from the text widget.
decimal: 0, $ ; The number of decimals points in FLOAT and DOUBLE numbers.
digits: 0, $ ; The number of digits in INT and LONG numbers.
focus: 0L, $ ; A flag to indicate focus events should be returned.
gentype: "", $ ; The "general" type of data: INTEGER, UNSIGNED, FLOAT, or STRING.
labelID: Obj_New(), $ ; The label widget ID.
tabnext: Obj_New(), $ ; The identifier of a widget to receive the cursor focus if a TAB character is detected.
textID: Obj_New(), $ ; The text widget ID.
theText: "", $ ; The actual text in the text widget.
theValue: Ptr_New(), $ ; The actual "value" of the text in the text widget. :-)
positive: 0, $ ; A flag meaning only positive numbers allowed.
undefined: Ptr_New(), $ ; The undefined data type.
INHERITS BASEWIDGET $
} Messages
None.
EVENTS:
All events are handled internally unless the keywords CR_EVENTS or FOCUS_EVENTS are used.
If the CR_EVENTS keyword is used, the event structure returned to your Event Handler routine
is defined like this:
{ID:Obj_New(), TOP:Obj_New(), HANDLER:Obj_New(), NAME:self._name, $
EVENT_NAME:'FIELD_CARRIAGE_RETURN_EVENT', VALUE:Ptr_New(), TYPE:""}
If the FOCUS_EVENTS keyword is use, the event structure returned to your Event Handler routine
is defined like this, where ENTER is 0 if focus leaves the text widget and is 1 if focus enters
the text widget:
{ID:Obj_New(), TOP:Obj_New(), HANDLER:Obj_New(), NAME:self._name, $
EVENT_NAME:'FIELD_CARRIAGE_RETURN_EVENT', VALUE:Ptr_New(), TYPE:"", ENTER:0}
Modification History
Written by: David W. Fanning, 18 July 2004.
Fixed a problem with validating a float or double value when it was written with
exponential notation. 2 April 2010. DWF.