Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: restoreregions - Tool Up: recordbrowserwidget - Tool Previous: recordbrowserwidget - Tool


recordbrowserwidget - Constructor



Package display
Module widgets
Tool recordbrowserwidget


Construct a recordbrowserwidget


Synopsis
recordbrowserwidget(parent, therecord, readonly, show, width, font, widgetset, displaytable)


Arguments

parent Parent of the widget
Allowed: Tk frame
Default: F
therecord A valid Glish record (required)
Allowed: a Glish record
readonly Flag to disallow editing
Allowed: boolean
Default: T
show Flag to display widget after contruction
Allowed: boolean
Default: T
width Initial width of the canvas
Allowed: Integer
Default: 400
font Font of text
Allowed: X font
Default: ''
widgetset Widget set to use
Allowed: A widgetserver closure tool
Default: dws
displaytable Flag indicating table awareness
Allowed: boolean
Default: T


Returns
recordbrowserwidget widget


Description
Constructs a recordbrowserwidget according to the specified construction arguments, and returns the subsequence of the widget. Remember to use the recordbrowserwidget via the widgetserver if at all possible.

The recordbrowser widget must always be initialized with a valid record.

If no parent is specified then a minmal recordbrowser is displayed.

You may send the recordbrowserwidget many events

1.
newrecord, record causes the widget to display the specified record i.e. rbw- >newrecord(myrec).
2.
font cause the recordbrowser to use the new font sent to it, rbw- >font(myfont).
3.
show causes the recordbrowser to become visible if not already.
4.
close causes the recordbrowser to become invisible if not already.
5.
readonly toggles the readonly flag enabling editing if false, rbw- >readonly() or rbw- >readonly(F).
6.
reset resets the record to it's original state (only valid if readonly=F), rbw- >reset().
7.
vectorsize sets the limits of arrays that are displayed, rbw- >vectorsize([60,60] (The examples will let you look at arrays up to 60 by 60 in the recordbrowser, larger arrays will be viewed in in the array browser).
8.
showproperties causes a properties dialog for the the recordbrowser widget to be displayed, rbw- >showproperties(). The dialog window allows the interactive setting of vectorsize and font.
9.
newfield if readonly is F, then you may added field to the record, rb- >newfield(fieldName='field1.field2', fieldValue='evalable string'). Note the fieldValue must be an evalable string otherwise bad things happen.
10.
deletefield if readonly is F, then you may delete fields from the record, rb- >deletefield('field1.field2'). Just specify the fields in the record you want to delete.

The recordbrowser widget does not signal any events.



Example
include 'recordbrowserwidget.g'   
rb := dws.recordbrowserwidget(therecord=system);
Will produce a generic record-browser dialog.








next up previous contents index
Next: restoreregions - Tool Up: recordbrowserwidget - Tool Previous: recordbrowserwidget - Tool   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15