source: trunk/WIDGET/AUTOUR_de_XXX/changefield.pro @ 2

Last change on this file since 2 was 2, checked in by opalod, 22 years ago

Initial revision

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 1.2 KB
Line 
1PRO changefield, base, newfieldname, BOITE = boite
2;
3   widget_control, base, get_uvalue = top_uvalue
4;
5; changement de exextra :
6   exextra = definedefaultextra(newfieldname)
7   specifieid = widget_info(base,find_by_uname = 'specifie')
8   widget_control, specifieid, set_value = exextra
9; chamgement de variable -> devra-t-on changer de domaine verticale?
10   oldzgrid = extractatt(top_uvalue, 'zgrid')
11   currentfile = extractatt(top_uvalue, 'currentfile')
12   listgrid = (*(extractatt(top_uvalue, 'fileparameters'))[currentfile]).listgrid
13   listvar = (*(extractatt(top_uvalue, 'fileparameters'))[currentfile]).listvar
14;   for i = 0,  n_elements(listvar)-1 do print,  listvar[i], '/', listgrid[i]
15   indexvar = where(listvar EQ newfieldname) & indexvar = 0 > indexvar[0]
16   vargrid = strupcase(listgrid[indexvar])
17   IF vargrid EQ 'W' then zgrid = 'W' ELSE zgrid = 'T'
18   if zgrid NE oldzgrid then BEGIN
19      *top_uvalue[1, findline(top_uvalue, 'zgrid')] = zgrid
20      if NOT keyword_set(boite) THEN BEGIN
21         widget_control, widget_info(base, find_by_uname = 'domain'), get_value = boite
22         widget_control, widget_info(base, find_by_uname = 'domain'), set_value = boite
23      endif
24   endif
25;
26   return
27end
Note: See TracBrowser for help on using the repository browser.