@@ -75,7 +75,7 @@ Function createPanel()
75
75
ListBox $ listCtrl, win=$ panel, proc=$ ( module + "#ListBoxProc" )
76
76
ListBox $ listCtrl, win=$ panel, mode=5, selCol=1, widths= { 4,40 } , keySelectCol=1
77
77
ListBox $ listCtrl, win=$ panel, listWave= getDeclWave ()
78
- ListBox $ listCtrl, win=$ panel, selRow= prefs. panelElement, row= prefs. panelElement
78
+ ListBox $ listCtrl, win=$ panel, selRow= prefs. panelElement, row= prefs. panelTopElement
79
79
80
80
ListBox $ listCtrl, userdata ( ResizeControlsInfo) = A"!!,?X!!#@\" !!#BNJ,hopz!!#](Aon\" Qzzzzzzzzzzzzzz!!#o2B4uAezz"
81
81
ListBox $ listCtrl, userdata ( ResizeControlsInfo) += A"zzzzzzzzzzzz!!#N3Bk1ct<C]S6zzzzzzzzzz"
@@ -270,29 +270,33 @@ End
270
270
// module: return selected NameSpace
271
271
// procedure: return selected procedure
272
272
// index: return selected index in listbox
273
- Function getCurrentItemAsNumeric ( [ module, procedure, index] )
274
- variable module, procedure, index
273
+ Function getCurrentItemAsNumeric ( [ module, procedure, index, indexTop ] )
274
+ variable module, procedure, index, indexTop
275
275
276
276
string procName
277
277
278
278
module = ParamIsDefault ( module) ? 0 : 1
279
279
procedure = ParamIsDefault ( procedure) ? 0 : 1
280
280
index = ParamIsDefault ( index) ? 0 : 1
281
+ indexTop = ParamIsDefault ( indexTop) ? 0 : 1
281
282
282
283
// only one optional argument allowed
283
- if ( module + procedure + index != 1 )
284
+ if ( module + procedure + index + indexTop != 1 )
284
285
return -1 // error
285
286
endif
286
287
287
288
if ( module)
288
289
ControlInfo / W=$ panel $ moduleCtrl
289
290
elseif ( procedure)
290
291
ControlInfo / W=$ panel $ procCtrl
291
- elseif ( index)
292
+ elseif ( index || indexTop )
292
293
ControlInfo / W=$ panel $ listCtrl
293
294
endif
294
295
295
296
if ( V_Value >= 0 )
297
+ if ( indexTop)
298
+ return V_startRow
299
+ endif
296
300
return V_Value
297
301
endif
298
302
0 commit comments