How To: Set the brightness theme of a grid using Avenue
The brightness theme of a grid can be specified through Avenue using the GLegExt class on the GTheme legend.
The following sample code can be used to set the brightness theme. This sample code uses datasets from the \esri\av_gis30\arctutor\spatial directory.
- Copy and paste the sample code below into a new script editor window.
'The following script shows how to set the brightness
'To test, load the Spatial Analyst Extension
'Add the Hillshd and Elevgrd themes to a View
'Make Elevgrd the first theme in the TOC.
theView = av.GetActiveDoc
thetheme = theView.Getthemes.Get(0) 'Elevgrd
theLegend = thetheme.GetLegend
theGLegExtension = theLegend.GetExtension(GLegExt)
- Press the Compile button.
- Tile the ArcView window so you can see the View and Script windows at the same time.
- Click from the View directly to the Script window.
- From the script window, click the Run button.