- Timestamp:
- Jun 12, 2008 2:56:20 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/SANS/Analysis/Models/Packages/Wrapper_v40.ipf
r380 r384 118 118 119 119 120 //obvious use 120 //obvious use, now finds the most recent data loaded, finds the folder, and pops the menu with that selection... 121 // 121 122 Function W_LoadDataButtonProc(ba) : ButtonControl 122 123 STRUCT WMButtonAction &ba … … 130 131 endif 131 132 Execute "A_LoadOneDData()" 133 134 ControlUpdate/W=WrapperPanel popup_0 135 //instead of a simple controlUpdate, better to pop the menu to make sure that the other menus follow 136 // convoluted method to find the right item and pop the menu. 137 138 // data is plotted, so get the "new" top graph 139 topGraph= WinName(0,1) //this is the topmost graph, and should exist, but... 140 if(cmpstr(topGraph,"")==0) 141 return(0) 142 endif 143 String list,folderStr 144 Variable num 145 list = TraceNameList(topGraph,";",1) //want the last item in the list 146 num= ItemsInList(list) 147 FolderStr = StringFromList(num-1,list,";") 148 folderStr = folderStr[0,strlen(folderStr)-3] //remove the "_i" that the loader enforced 149 list = W_DataSetPopupList() 150 num=WhichListItem(folderStr,list,";",0,0) 151 if(num != -1) 152 PopupMenu popup_0,mode=num+1,win=WrapperPanel 153 ControlUpdate/W=WrapperPanel popup_0 154 155 // fake mouse up 156 Struct WMPopupAction ps 157 ps.eventCode = 2 //fake mouse up 158 // ps.popStr = str 159 DataSet_PopMenuProc(ps) 160 161 // new data set has been selected, always uncheck the "use cursors", other checkboxes are benign. 162 CheckBox check_0,win=WrapperPanel,value=0 163 endif 132 164 break 133 165 endswitch 134 166 135 // ControlUpdate/W=WrapperPanel popup_0136 //instead of a simple controlUpdate, better to pop the menu to make sure that the other menus follow137 // but not sure how to get the most recently loaded file as the selected item - bring the138 // wrapper panel back to the top - then pop -139 167 140 168 return 0 … … 398 426 // print "str = ",str 399 427 //set the item in the coef popup, and pop it 400 PopupMenu popup_2 mode=(num+1)428 PopupMenu popup_2 win=WrapperPanel,mode=(num+1) 401 429 402 430 Struct WMPopupAction ps … … 1155 1183 STRUCT WMCheckboxAction &cba 1156 1184 1157 String topGraph= WinName(0,1) //this is the topmost graph 1185 String topGraph= WinName(0,1) //this is the topmost graph 1186 if(cmpstr(topGraph,"")==0) //no graphs, uncheck and exit 1187 CheckBox check_0,value=0 1188 return(0) 1189 endif 1190 1158 1191 String ciStr = CsrInfo(A , topGraph) 1159 1192
Note: See TracChangeset
for help on using the changeset viewer.