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


next up previous contents index
Next: combobox.insert - Function Up: combobox - Tool Previous: combobox.disabled - Function


combobox.delete - Function



Package display
Module widgets
Tool combobox


Delete an item or range of items from the combobox.


Synopsis
delete(first, last)


Arguments

first The first item to delete
Allowed: Any valid item number from 0 to the end plus 'selected' and 'end'
last The last item to delete, if F just get the first
Allowed: Any index >= first or F
Default: F


Description
This deletes these items from the list. If the current selection falls within the specified range, the first item before the range is selected or the first item after the range is selected if the range includes item 0. If the entire contents are deleted, there is no current selection after this function has returned. As with the glishtk listbox, the index numbers here are 0-relative (i.e. the first item is item number 0). ``selected'' translates to the index of the current selection, ``end'' translates to the last item in the combobox. delete() returns a fail if the index is out of range or otherwise does not exist (e.g. there is no current selection) and the contents of the combobox will remain unchanged in that case.


Example
	   f := frame();
           cb := combobox(f,'colors',"red blue green yellow amber saffron")
           # delete everything from the current selection to the end
           # the new selection is whatever immediately preceeds the current
           # selection or nothing, if 'selected' is item 0.
           cb.delete('selected','end')




next up previous contents index
Next: combobox.insert - Function Up: combobox - Tool Previous: combobox.disabled - Function   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