source: sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_MainPanel.ipf @ 1248

Last change on this file since 1248 was 1246, checked in by srkline, 3 years ago

A large number of changes to the size of panels to enable "Laptop Mode" where all of the panels and controls are scaled down so that they fit on screen and are still in correct proportion. For the laptop I'm using for testing, the resolution is 1920x1080. For this, a scaling of 0.7 seems to work. The on/off of the "laptop Mode" is controlled by a checkbox in the preference panel (under the General tab).

There are still more panels to update in the next commit.

  • Property svn:executable set to *
File size: 19.1 KB
Line 
1#pragma rtGlobals=1             // Use modern global access method.
2#pragma IgorVersion = 7.00
3
4
5//*********************
6//
7//draws main panel of buttons for all data reduction operations
8//panel can't be killed (without really trying)
9// V_initialize() from the VSANS menu will redraw the panel
10//panel simply dispatches to previously written procedures (not functions)
11//
12// **function names are really self-explanatory...see the called function for the real details
13//
14//**********************
15
16
17//
18//
19// x- update this to be VSANS-specific, eliminating junk that is SANS only or VAX-specific
20//
21
22
23//
24// x- decide whether to automatically read in the mask, or not (NO)
25// x- there could be a default mask, or look for the mask that is speficied in the
26// next file that is read in from the path
27Proc V_PickPath_MainButtonProc(ctrlName) : ButtonControl
28        String ctrlName
29       
30        V_PickPath()
31        // read in DEFAULT.MASK, if it exists, otherwise, do nothing
32        //
33//      PathInfo catPathName
34//      if(V_flag==1)
35//              String str = S_Path + "DEFAULT.MASK"
36//              Variable refnum
37//              Open/R/Z=1 refnum as str
38//              if(strlen(S_filename) != 0)
39//                      Close refnum            //file can be found OK
40//                      ReadMCID_MASK(str)
41//              else
42//                      // file not found, close just in case
43//                      Close/A
44//              endif
45//      endif
46End
47
48Proc V_DrawMask_MainButtonProc(ctrlName) : ButtonControl
49        String ctrlName
50       
51        V_Edit_a_Mask()
52End
53
54
55//
56// this will only load the data into RAW, overwriting whatever is there. no copy is put in rawVSANS
57//
58Proc V_DisplayMainButtonProc(ctrlName) : ButtonControl
59        String ctrlName
60
61        Variable err=   V_LoadHDF5Data("","RAW")                        // load the data
62//      Print "Load err = "+num2str(err)
63        if(!err)
64                String hdfDF = root:file_name                   // last file loaded, may not be the safest way to pass
65                String folder = StringFromList(0,hdfDF,".")
66               
67                // this (in SANS) just passes directly to fRawWindowHook()
68                V_UpdateDisplayInformation("RAW")               // plot the data in whatever folder type
69                               
70                // set the global to display ONLY if the load was called from here, not from the
71                // other routines that load data (to read in values)
72                root:Packages:NIST:VSANS:Globals:gLastLoadedFile = root:file_name
73               
74        endif
75End
76
77Proc V_PatchMainButtonProc(ctrlName) : ButtonControl
78        String ctrlName
79
80        V_PatchFiles()
81End
82
83Proc V_Patch_XY_MainButtonProc(ctrlName) : ButtonControl
84        String ctrlName
85
86        V_PatchDet_xyCenters_Panel()
87End
88
89Proc V_Patch_DeadTime_MainButtonProc(ctrlName) : ButtonControl
90        String ctrlName
91
92        V_PatchDetectorDeadtimePanel()
93End
94
95Proc V_Patch_Calib_MainButtonProc(ctrlName) : ButtonControl
96        String ctrlName
97
98        V_PatchDetectorCalibrationPanel()
99End
100
101
102Proc V_TransMainButtonProc(ctrlName) : ButtonControl
103        String ctrlName
104
105         V_InitTransmissionPanel()
106End
107
108Proc V_BuildProtocol_MainButtonProc(ctrlName) : ButtonControl
109        String ctrlName
110
111        V_ReductionProtocolPanel()
112End
113
114Proc V_ReduceAFile_MainButtonProc(ctrlName) : ButtonControl
115        String ctrlName
116
117        V_ReductionProtocolPanel()
118//      ReduceAFile()
119End
120
121Proc V_ReduceMultiple_MainButtonProc(ctrlName) : ButtonControl
122        String ctrlName
123
124        V_ReduceMultipleFiles()
125End
126
127Proc V_Plot1D_MainButtonProc(ctrlName) : ButtonControl
128        String ctrlName
129
130        //LoadOneDData()
131        Show_Plot_Manager()
132End
133
134Proc V_Sort1D_MainButtonProc(ctrlName) : ButtonControl
135        String ctrlName
136
137//      ShowNSORTPanel()
138       
139End
140
141Proc V_Combine1D_MainButtonProc(ctrlName) : ButtonControl
142        String ctrlName
143
144//      ShowCombinePanel()
145        V_CombineDataGraph()
146End
147
148
149Proc V_Fit1D_MainButtonProc(ctrlName) : ButtonControl
150        String ctrlName
151
152        DoAlert 0, "This function has not been updated for VSANS yet..."
153
154//      OpenFITPanel()
155End
156
157//Proc V_FitRPA_MainButtonProc(ctrlName) : ButtonControl
158//      String ctrlName
159//
160//      OpenFITRPAPanel()
161//End
162
163Proc V_Subtract1D_MainButtonProc(ctrlName) : ButtonControl
164        String ctrlName
165
166        OpenSubtract1DPanel()
167End
168
169Proc V_Arithmetic1D_MainButtonProc(ctrlName) : ButtonControl
170        String ctrlName
171
172        DoAlert 0, "This function has not been updated for VSANS yet..."
173
174//      MakeDAPanel()
175End
176
177Proc V_DisplayInterm_MainButtonProc(ctrlName) : ButtonControl
178        String ctrlName
179
180        V_ChangeDisplay()
181End
182
183//
184// - fill in with a proper reader that will display the mask(s)
185Proc V_ReadMask_MainButtonProc(ctrlName) : ButtonControl
186        String ctrlName
187
188        DoAlert 0, "Loading MASK data"
189        V_LoadMASKData()
190End
191
192Proc V_Draw3D_MainButtonProc(ctrlName) : ButtonControl
193        String ctrlName
194
195//      DoAlert 0, "This function has not been updated for VSANS yet..."
196        DoAlert 0, "Right-click on the image and select '3D Surface from data'"
197
198//      Plot3DSurface()
199       
200End
201
202////on Misc Ops tab, generates a notebook
203//Proc V_CatShort_MainButtonProc(ctrlName) : ButtonControl
204//      String ctrlName
205//
206//      BuildCatShortNotebook()
207//End
208
209//button is labeled "File Catalog"
210Proc V_CatVShort_MainButtonProc(ctrlName) : ButtonControl
211        String ctrlName
212
213        V_BuildCatVeryShortTable()
214End
215
216Proc V_CatSort_MainButtonProc(ctrlName) : ButtonControl
217        String ctrlName
218       
219        V_Catalog_Sort()
220End
221
222Proc V_ShowCatShort_MainButtonProc(ctrlName) : ButtonControl
223        String ctrlName
224
225        ShowCATWindow()
226End
227
228Proc V_ShowSchematic_MainButtonProc(ctrlName) : ButtonControl
229        String ctrlName
230       
231        if(root:myGlobals:isDemoVersion == 1)
232                //      comment out in DEMO_MODIFIED version, and show the alert
233                DoAlert 0,"This operation is not available in the Demo version of IGOR"
234        else
235                ShowSchematic()
236        endif
237End
238
239Proc V_ShowAvePanel_MainButtonProc(ctrlName) : ButtonControl
240        String ctrlName
241
242        ShowAveragePanel()
243End
244
245Proc V_HelpMainButtonProc(ctrlName) : ButtonControl
246        String ctrlName
247        DisplayHelpTopic/Z/K=1 "VSANS Data Reduction Documentation"
248        if(V_flag !=0)
249                DoAlert 0,"The VSANS Data Reduction Help file could not be found"
250        endif
251End
252
253Proc V_ShowTilePanel_MainButtonProc(ctrlName) : ButtonControl
254        String ctrlName
255       
256        if(root:myGlobals:isDemoVersion == 1)
257                //      comment out in DEMO_MODIFIED version, and show the alert
258                DoAlert 0,"This operation is not available in the Demo version of IGOR"
259        else
260                Show_Tile_2D_Panel()
261        endif
262End
263
264Proc V_NonLinTubes_MainButtonProc(ctrlName) : ButtonControl
265        String ctrlName
266
267        V_TubeCoefPanel()
268End
269
270Proc V_CopyWork_MainButtonProc(ctrlName) : ButtonControl
271        String ctrlName
272
273        V_CopyWorkFolder()              //will put up missing param dialog
274End
275
276Proc V_PRODIV_MainButtonProc(ctrlName) : ButtonControl
277        String ctrlName
278
279        DoWindow/F DIV_Setup_Panel
280        if(V_flag == 0)
281                DIV_Setup_Panel()
282        endif
283       
284        DoWindow/F VSANS_DIVPanels
285        if(V_flag == 0)
286                V_Display_DIV_Panels() 
287        endif
288End
289
290
291Proc V_WorkMath_MainButtonProc(ctrlName) : ButtonControl
292        String ctrlName
293
294        Show_WorkMath_Panel()
295End
296
297//Proc V_TISANE_MainButtonProc(ctrlName) : ButtonControl
298//      String ctrlName
299//     
300//      if(exists("Show_TISANE_Panel")==0)
301//              // procedure file was not loaded
302//              DoAlert 0,"This operation is not available in this set of macros"
303//      else
304//              Show_TISANE_Panel()
305//      endif
306//     
307//End
308
309Proc V_Event_MainButtonProc(ctrlName) : ButtonControl
310        String ctrlName
311       
312        if(exists("V_Show_Event_Panel")==0)
313                // procedure file was not loaded
314                DoAlert 0,"Only test procedures exist. See V_VSANS_Event_Testing.ipf"
315        else
316                V_Show_Event_Panel()
317        endif
318       
319End
320
321Proc V_Event_MultReduceButtonProc(ctrlName) : ButtonControl
322        String ctrlName
323       
324                V_ReduceEventFilesPanel()
325       
326End
327
328Proc V_Raw2ASCII_MainButtonProc(ctrlName) : ButtonControl
329        String ctrlName
330
331        Export_RAW_Ascii_Panel()
332End
333
334Proc V_RealTime_MainButtonProc(ctrlName) : ButtonControl
335        String ctrlName
336
337        if(exists("V_Init_RT")==0)
338                // procedure file was not loaded
339                DoAlert 0,"This operation is not available in this set of macros"
340        else
341                V_Show_RealTime_Panel()
342        endif
343End
344
345Proc V_RTReduce_MainButtonProc(ctrlName) : ButtonControl
346        String ctrlName
347
348        V_ShowOnlineReductionPanel()
349End
350
351Proc V_Preferences_MainButtonProc(ctrlName) : ButtonControl
352        String ctrlName
353
354        Show_VSANSPreferences_Panel()
355End
356
357
358Proc V_DataTree_MainButtonProc(ctrlName) : ButtonControl
359        String ctrlName
360
361        V_ShowDataFolderTree()
362End
363
364////////////////////////////////////////////////
365//************* NEW version of Main control Panel *****************
366//
367// button management for the different tabs is handled by consistent
368// naming of each button with its tab number as documented below
369// then MainTabProc() can enable/disable the appropriate buttons for the
370// tab that is displayed
371//
372// panel must be killed and redrawn for new buttons to appear
373//
374Window Main_VSANS_Panel()
375        Variable sc=1
376       
377        if(root:Packages:NIST:VSANS:Globals:gLaptopMode == 1)
378                sc = 0.7
379        endif
380
381        PauseUpdate; Silent 1           // building window...
382        NewPanel /W=(500*sc,60*sc,924*sc,320*sc) /K=1 as "VSANS Reduction Controls" + " " + num2str(kVSANSVersion)
383        ModifyPanel cbRGB=(49694,61514,27679)
384        ModifyPanel fixedSize=1
385//////
386//on main portion of panel
387        Button MainButtonA,pos={sc*8,8*sc},size={sc*80,20*sc},title="Pick Path",proc=V_PickPath_MainButtonProc
388        Button MainButtonA,help={"Pick the local data folder that contains the VSANS data"}
389        Button MainButtonB,pos={sc*100,8*sc},size={sc*90,20*sc},proc=V_CatVShort_MainButtonProc,title="File Catalog"
390        Button MainButtonB,help={"This will generate a condensed CATalog table of all files in a specified local folder"}
391        Button MainButtonC,pos={sc*250,8*sc},size={sc*50,20*sc},proc=V_HelpMainButtonProc,title="Help"
392        Button MainButtonC,help={"Display the help file"}
393        Button MainButtonD,pos={sc*320,8*sc},size={sc*80,20*sc},proc=V_SR_OpenTracTicketPage,title="Feedback"
394        Button MainButtonD,help={"Submit bug reports or feature requests"}
395       
396        TabControl MainTab,pos={sc*7,49*sc},size={sc*410,202*sc},tabLabel(0)="Raw Data",proc=V_MainTabProc
397        TabControl MainTab,tabLabel(1)="Reduction",tabLabel(2)="1-D Ops",tabLabel(3)="2-D Ops",tabLabel(4)="Misc Ops"
398        TabControl MainTab,value=0
399        //
400        TabControl MainTab labelBack=(47748,57192,54093)
401       
402//on tab(0) - Raw Data - initially visible
403        Button MainButton_0a,pos={sc*15,90*sc},size={sc*130,20*sc},proc=V_DisplayMainButtonProc,title="Display Raw Data"
404        Button MainButton_0a,help={"Display will load and plot a single 2-D raw data file"}
405        Button MainButton_0b,pos={sc*15,120*sc},size={sc*70,20*sc},proc=V_PatchMainButtonProc,title="Patch"
406        Button MainButton_0b,help={"Patch will update incorrect information in raw data headers"}
407        Button MainButton_0c,pos={sc*15,150*sc},size={sc*110,20*sc},proc=V_TransMainButtonProc,title="Transmission"
408        Button MainButton_0c,help={"Shows the panel which allows calculation of sample transmissions and patching values into raw data headers"}
409        Button MainButton_0d,pos={sc*15,180*sc},size={sc*130,20*sc},proc=V_RealTime_MainButtonProc,title="RealTime Display"
410        Button MainButton_0d,help={"Shows the panel for control of the RealTime data display. Only used during data collection"}
411        Button MainButton_0e,pos={sc*15,210*sc},size={sc*130,20*sc},proc=V_CatSort_MainButtonProc,title="Sort Catalog"
412        Button MainButton_0e,help={"Sort the Data Catalog, courtesy of ANSTO"}
413        Button MainButton_0f,pos={sc*300,90*sc},size={sc*90,20*sc},proc=V_DataTree_MainButtonProc,title="Data Tree"
414        Button MainButton_0f,help={"Show the header and data tree"}
415        Button MainButton_0g,pos={sc*170,180*sc},size={sc*110,20*sc},proc=V_RTReduce_MainButtonProc,title="RT Reduction"
416        Button MainButton_0g,help={"Reduce live (incomplete) data files during acquisition"}
417        Button MainButton_0h,pos={sc*170,90*sc},size={sc*90,20*sc},proc=V_Patch_XY_MainButtonProc,title="Patch XY"
418        Button MainButton_0h,help={"Easy patching of XY beam center to multiple files"}
419        Button MainButton_0i,pos={sc*170,120*sc},size={sc*110,20*sc},proc=V_Patch_DeadTime_MainButtonProc,title="Patch DeadTime"
420        Button MainButton_0i,help={"Easy patching of dead time tables to multiple files"}
421        Button MainButton_0j,pos={sc*170,150*sc},size={sc*90,20*sc},proc=V_Patch_Calib_MainButtonProc,title="Patch Calib"
422        Button MainButton_0j,help={"Easy patching of nonlinear calibration tables to multiple files"}
423
424//on tab(1) - Reduction
425        Button MainButton_1a,pos={sc*15,90*sc},size={sc*110,20*sc},proc=V_BuildProtocol_MainButtonProc,title="Build Protocol"
426        Button MainButton_1a,help={"Shows a panel where the CATalog window is used as input for creating a protocol. Can also be used for standard reductions"}
427//      Button MainButton_1b,pos={sc*15,120*sc},size={sc*110,20*sc},proc=V_ReduceAFile_MainButtonProc,title="Reduce a File"
428//      Button MainButton_1b,help={"Presents a questionnare for creating a reduction protocol, then reduces a single file"}
429        Button MainButton_1c,pos={sc*15,150*sc},size={sc*160,20*sc},proc=V_ReduceMultiple_MainButtonProc,title="Reduce Multiple Files"
430        Button MainButton_1c,help={"Use for reducing multiple raw datasets after protocol(s) have been created"}
431//      Button MainButton_1d,pos={sc*15,180*sc},size={sc*110,20*sc},proc=V_ShowCatShort_MainButtonProc,title="Show CAT Table"
432//      Button MainButton_1d,help={"This button will bring the CATalog window to the front, if it exists"}
433        Button MainButton_1a,disable=1
434//      Button MainButton_1b,disable=1
435        Button MainButton_1c,disable=1
436//      Button MainButton_1d,disable=1
437
438//on tab(2) - 1-D operations
439        Button MainButton_2a,pos={sc*15,90*sc},size={sc*60,20*sc},proc=V_Plot1D_MainButtonProc,title="Plot"
440        Button MainButton_2a,help={"Loads and plots a 1-D dataset in the format expected by \"FIT\""}
441//      Button MainButton_2b,pos={sc*15,120*sc},size={sc*60,20*sc},proc=V_Sort1D_MainButtonProc,title="Sort"
442//      Button MainButton_2b,help={"Sorts and combines 2 or 3 separate 1-D datasets into a single file. Use \"Plot\" button to import 1-D data files"}
443        Button MainButton_2c,pos={sc*15,150*sc},size={sc*60,20*sc},proc=V_Fit1D_MainButtonProc,title="FIT"
444        Button MainButton_2c,help={"Shows panel for performing a variety of linearized fits to 1-D data files. Use \"Plot\" button to import 1-D data files"}
445//      Button MainButton_2d,pos={sc*15,180*sc},size={sc*60,20*sc},proc=V_FITRPA_MainButtonProc,title="FIT/RPA"
446//      Button MainButton_2d,help={"Shows panel for performing a fit to a polymer standard."}
447//      Button MainButton_2e,pos={sc*120,90*sc},size={sc*90,20*sc},proc=V_Subtract1D_MainButtonProc,title="Subtract 1D"
448//      Button MainButton_2e,help={"Shows panel for subtracting two 1-D data sets"}
449        Button MainButton_2e,pos={sc*120,90*sc},size={sc*110,20*sc},proc=V_Arithmetic1D_MainButtonProc,title="1D Arithmetic"
450        Button MainButton_2e,help={"Shows panel for doing arithmetic on 1D data sets"}
451        Button MainButton_2f,pos={sc*120,120*sc},size={sc*130,20*sc},proc=V_Combine1D_MainButtonProc,title="Combine 1D Files"
452        Button MainButton_2f,help={"Shows panel for selecting points to trim before combining files"}
453        Button MainButton_2a,disable=1
454//      Button MainButton_2b,disable=1
455        Button MainButton_2c,disable=1
456//      Button MainButton_2d,disable=1
457        Button MainButton_2e,disable=1
458        Button MainButton_2f,disable=1
459
460
461
462//on tab(3) - 2-D Operations
463        Button MainButton_3a,pos={sc*15,90*sc},size={sc*90,20*sc},proc=V_DisplayInterm_MainButtonProc,title="Display 2D"
464        Button MainButton_3a,help={"Display will plot a 2-D work data file that has previously been created during data reduction"}
465        Button MainButton_3b,pos={sc*15,120*sc},size={sc*90,20*sc},title="Draw Mask",proc=V_DrawMask_MainButtonProc
466        Button MainButton_3b,help={"Draw a mask file and save it."}
467        Button MainButton_3c,pos={sc*15,150*sc},size={sc*90,20*sc},proc=V_ReadMask_MainButtonProc,title="Read Mask"
468        Button MainButton_3c,help={"Reads a mask file into the proper work folder"}
469//      Button MainButton_3d,pos={sc*15,180*sc},size={sc*100,20*sc},title="Tile RAW 2D",proc=V_ShowTilePanel_MainButtonProc
470//      Button MainButton_3d,help={"Adds selected RAW data files to a layout."}
471        Button MainButton_3e,pos={sc*150,90*sc},size={sc*100,20*sc},title="Copy Work",proc=V_CopyWork_MainButtonProc
472        Button MainButton_3e,help={"Copies WORK data from specified folder to destination folder."}
473//      Button MainButton_3f,pos={sc*150,120*sc},size={sc*110,20*sc},title="WorkFile Math",proc=V_WorkMath_MainButtonProc
474//      Button MainButton_3f,help={"Perfom simple math operations on workfile data"}
475        Button MainButton_3g,pos={sc*150,150*sc},size={sc*100,20*sc},title="Event Data",proc=V_Event_MainButtonProc
476        Button MainButton_3g,help={"Manipulate VSANS Event Mode data"}
477        Button MainButton_3h,pos={sc*150,180*sc},size={sc*140,20*sc},title="Event Reduction",proc=V_Event_MultReduceButtonProc
478        Button MainButton_3h,help={"Reduce VSANS Event Mode data"}
479               
480       
481        Button MainButton_3a,disable=1
482        Button MainButton_3b,disable=1
483        Button MainButton_3c,disable=1
484//      Button MainButton_3d,disable=1
485        Button MainButton_3e,disable=1
486//      Button MainButton_3f,disable=1
487        Button MainButton_3g,disable=1
488        Button MainButton_3h,disable=1
489
490//on tab(4) - Miscellaneous operations
491        Button MainButton_4a,pos={sc*15,90*sc},size={sc*80,20*sc},proc=V_Draw3D_MainButtonProc,title="3D Display"
492        Button MainButton_4a,help={"Plots a 3-D surface of the selected file type"}
493//      Button MainButton_4b,pos={sc*15,120*sc},size={sc*120,20*sc},proc=V_ShowSchematic_MainButtonProc,title="Show Schematic"
494//      Button MainButton_4b,help={"Use this to show a schematic of the data reduction process for a selected sample file and reduction protocol"}
495//      Button MainButton_4c,pos={sc*15,150*sc},size={sc*80,20*sc},proc=V_ShowAvePanel_MainButtonProc,title="Average"
496//      Button MainButton_4c,help={"Shows a panel for interactive selection of the 1-D averaging step"}
497//      Button MainButton_4d,pos={sc*15,180*sc},size={sc*110,20*sc},proc=V_CatShort_MainButtonProc,title="CAT/Notebook"
498//      Button MainButton_4d,help={"This will generate a CATalog notebook of all files in a specified local folder"}
499        Button MainButton_4e,pos={sc*180,90*sc},size={sc*130,20*sc},proc=V_NonLinTubes_MainButtonProc,title="Fit NonLinear Tubes"
500        Button MainButton_4e,help={""}
501        Button MainButton_4f,pos={sc*180,120*sc},size={sc*130,20*sc},proc=V_PRODIV_MainButtonProc,title="Make DIV file"
502        Button MainButton_4f,help={"Displays panels and outlines the steps for generating a detector sensitivity file"}
503//      Button MainButton_4g,pos={sc*180,150*sc},size={sc*130,20*sc},proc=V_Raw2ASCII_MainButtonProc,title="RAW ASCII Export"
504//      Button MainButton_4g,help={"Exports selected RAW (2D) data file(s) as ASCII, either as pixel values or I(Qx,Qy)"}
505        Button MainButton_4h,pos={sc*180,180*sc},size={sc*130,20*sc},proc=V_Preferences_MainButtonProc,title="Preferences"
506        Button MainButton_4h,help={"Sets user preferences for selected parameters"}
507       
508        Button MainButton_4a,disable=1
509//      Button MainButton_4b,disable=1
510//      Button MainButton_4c,disable=1
511//      Button MainButton_4d,disable=1
512        Button MainButton_4e,disable=1
513        Button MainButton_4f,disable=1
514//      Button MainButton_4g,disable=1
515        Button MainButton_4h,disable=1
516//     
517EndMacro
518
519// function to control the drawing of buttons in the TabControl on the main panel
520// Naming scheme for the buttons MUST be strictly adhered to... else buttons will
521// appear in odd places...
522// all buttons are named MainButton_NA where N is the tab number and A is the letter denoting
523// the button's position on that particular tab.
524// in this way, buttons will always be drawn correctly..
525//
526Function V_MainTabProc(name,tab)
527        String name
528        Variable tab
529       
530//      Print "name,number",name,tab
531        String ctrlList = ControlNameList("",";"),item="",nameStr=""
532        Variable num = ItemsinList(ctrlList,";"),ii,onTab
533        for(ii=0;ii<num;ii+=1)
534                //items all start w/"MainButton_"
535                item=StringFromList(ii, ctrlList ,";")
536                nameStr=item[0,10]
537                if(cmpstr(nameStr,"MainButton_")==0)
538                        onTab = str2num(item[11])
539                        Button $item,disable=(tab!=onTab)
540                endif
541        endfor
542End
543
544//
545Function V_SR_OpenTracTicketPage(ctrlName)
546        String ctrlName
547        DoAlert 1,"Your web browser will open to a page where you can submit your bug report or feature request. OK?"
548        if(V_flag==1)
549                BrowseURL "http://danse.chem.utk.edu/trac/newticket"
550        endif
551End
552
Note: See TracBrowser for help on using the repository browser.