MGH_GUI_SETTEXT__DEFINE Class
MGH_GUI_SetText Purpose
This class implements a GUI application for changing a property of a client
application. The property value must be a string array.
Category
Widgets.
Calling Sequence
MGH_GUI_SetText supports two modes of operation. In the first,
a client object is specified and the dialogue exchanges information
with the client by calling the client's methods. An example of the
calling sequence is (within a client object's method):
mgh_new, 'MGH_GUI_SetText', CLIENT=self, CAPTION='Text' $
, /FLOATING, GROUP_LEADER=self.base $
, PROPERTY_NAME='STRINGS'
If this mode of operation is employed the object can be blocking/modal
or non-blocking.
In the second mode, there is no client & information is extracted
from the object after the widget is destroyed--this only works if the object
is blocking or modal. Thus
odlg = obj_new('MGH_GUI_SetText', /BLOCK, CAPTION='Text')
odlg->Manage
odlg->GetProperty, STATUS=status, VALUE=value
obj_destroy, odlg
case status of
0: print, 'Cancelled'
1: print, value
endcase
Properties
The following properties are supported:
CAPTION (Init)
The caption that appears to the left of the text entry fields.
The default is the property name in lower case.
CLIENT (Init, Get, Set)
A reference to the object whose property is to be modified.
The client must support GetProperty and SetProperty methods
which accept the property in question as a keyword. It must
also support a Update method.
PROPERTY_NAME (Init, Get)
The name of the property to be managed by this application..
SCALAR (Init, Get)
Set this property to generate a single-line widget that
returns a sclar string. Default is a multi-line widget
that returns a string array.
VALUE (Get, Set)
This application's own copy of the property value. (These values
are copied to & from the client application via the LoadData
and StoreData methods.
###########################################################################
This software is provided subject to the following conditions:
1. NIWA makes no representations or warranties regarding the
accuracy of the software, the use to which the software may
be put or the results to be obtained from the use of the
software. Accordingly NIWA accepts no liability for any loss
or damage (whether direct of indirect) incurred by any person
through the use of or reliance on the software.
2. NIWA is to be acknowledged as the original author of the
software where the software is used or presented in any form.
###########################################################################
Modification History
Mark Hadfield, Jul 2001:
Written based on MGH_GUI_SetArray