X

Help Articles are product support tips and information straight from the NV5 Geospatial Technical Support team developed to help you use our products to their fullest potential.



3594 Rate this article:
No rating

How to Construct a WIDGET_TABLE With No Row Labels


Normally when a table widget is constructed, the row headers will contain numbers if no row labels are specified. Is it possible to construct a table which has no row labels?

When creating a table via the WIDGET_TABLE routine, simply set the keyword ROW_LABELS equal to a null string ('') to make a table with no row labels. Please note that the fields for the row headers will still be shown, but they will be empty. See the Example Code section below.
; ---------------------------------------------------------
PRO noRowLabels_Event, ev

WIDGET_CONTROL, ev.top, /DESTROY

END

; ---------------------------------------------------------
PRO noRowLabels
tlb = WIDGET_BASE( TITLE='Table test' )

table_base = WIDGET_BASE( tlb, /COLUMN )

;set the column labels
col_labels = [ ' Label 1 ',$
' Label 2 ',$
' Label 3 ',$
' Label 4 ',$
' Label 5 ']

;Set the variable ncols equal to the number of elements in the col_labels array
ncols = N_ELEMENTS(col_labels)

;Build the table, notice the ROW_LABELS keyword is set to a null string. Also
; notice the XSIZE of the table is equal to ncols.
table = WIDGET_TABLE( table_base, $
COLUMN_LABELS=col_labels, $
ROW_LABELS='', $
XSIZE=ncols, $
YSIZE=6 )

exit_btn = WIDGET_BUTTON( table_base, VALUE='Exit' )

WIDGET_CONTROL, tlb, /REALIZE

XMANAGER, 'noRowLabels', tlb

END
Please login or register to post comments.
Featured

End-of-Life Policy Enforcement for ENVI 5.3 / IDL 8.5 and Earlier Versions

5/6/2024

April 1, 2024 Dear ENVI/IDL Customer,  We are reaching out to notify you of our supported... more »

How to Upgrade licenses to ENVI 6.x / IDL 9.x

12/5/2023

What is the new Upgrade function? Starting with ENVI 6.0 and IDL 9.0, we have implemented an... more »

What to do if the 'License Administrator - License Server' for the Next-Generation License Server does not start?

6/13/2023

Background: With the release of ENVI 5.7 & IDL 8.9 and the corresponding Next-Generation licensing... more »

Next-Generation Licensing FAQ

4/28/2023

  NV5 Geospatial has adopted a new licensing technology for all future releases of our ENVI, IDL... more »

The IDL Virtual Machine

6/6/2013

What is the IDL Virtual Machine? An IDL Virtual Machine is a runtime version of IDL that can... more »