DROPLISTWIDGET__DEFINE Name
DROPLISTWIDGET
Purpose
The purpose of this routine is to implement a droplist widget in an object
structure. This routine is a compound widget in order to give the droplist
more functionality than the current IDL droplist widget. In particular, it
is much easier to keep track of the current value of the droplist in this
implementation.
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
Compound object widgets. Syntax
aDroplist = Obj_New("DROPLISTWIDGET", parent, VALUE=['pig', 'cow', coyote'], INDEX=2)
Superclasses
BASEWIDGET
WIDGETATOM
ATOM
IDL_CONTAINER Class Structure
class = { DROPLISTWIDGET, $ ; The DROPLISTWIDGET object class definition.
_droplistID:0L, $ ; The droplist widget identifier.
_event_handler:Obj_New(), $ ; The assigned event handler object for the DROPLISTWIDGET.
_event_method_real: "", $ ; The event method assigned by the user to this object widget.
_index:0L, $ ; The index number of the current selecton.
_title: "", $ ; The droplist title.
_selection:Ptr_New(), $ ; The current droplist selection.
_value: Ptr_New(), $ ; The values or selections on the droplist.
INHERITS BASEWIDGET $
}
Event Structure
This is the event structure sent to the parent widget object.
event = { DROPLISTWIDGET_EVENT, $
ID:Obj_New(), $ ; The widget object that caused the event.
TOP: Obj_New(), $ ; The object at the top of the object hierarchy.
HANDLER:Obj_New(), $ ; The event handler object.
EVENT_NAME: "", $ ; The name of the event, DROPLISTWIDGET_EVENT.
NAME: "", $ ; The name of the object.
INDEX:0L, $ ; The index number of the current selection.
SELECTION:Ptr_New() $ ; The current droplist selection (i.e., value[index]).
}
Modification History
Written by: David W.Fanning, 23 July 2002.
Fixed typo in SetProperty method that prevented a VALUE from being set. 28 Oct 2010. DWF.