Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pickreader function in superlib 1

Status
Not open for further replies.

fbizzell

Programmer
Jul 3, 2000
217
I am using an old library called superlib. It had a function for pickreader to get input into a get using an array of values. The pickreader function works but it does not allow you to move the popup list to specified coordinates on the screen. It is suppose to but no matter what you enter as the coordinates the screen appears in the same place. Does anyone have a fix for this?
 
I guess I will have to stick with the unsupported and unchangeable pickreader function. I don't have the skills needed to use the achoice function.
 
Ignore my last post. I didn't realize you had already answered it. I will be happy if you send an explanation later.
 
OK, lol.

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
Hope this helps:
Code:
[small]
//I'm going to cut out what you don't need to use it as a when function.

function v_fel			//Name of function - can be in any module 
				//(prg file) of your application
xc:=col()-len(mfelony)		//memvar xc holds the column number of 
				//the first column in the get because the
				//col() function returns the current 
				//screen column, which is the cursor 
				//position after the get is printed.
xr:=row()			//memvar xr holds the current screen row.
declare wch[4]			//memvar wch is an array with 4 rows
wch[1]:='F - Felony'		//row one of wch, stores a text string.
wch[2]:='? - Unknown'		//row two of wch, stores a text string.
wch[3]:='N - None'		//row three of wch, stores a text string.
wch[4]:='B - Both'		//row four of wch, stores a text string.
save screen to vfel_scr		//Saves the contents of the screen where 
				//the popup will display to memvar vfel_scr
scroll(12,30,17,50,0)		//sets a scrolling area where popup 
				//will display
@ 12,30 to 17,50 double		//draws douple line box on area where popup 
				//will display.
vfel:=achoice(13,31,16,49,wch)	//achoice lets you pass top,left,bottom,right
				//screen coordinates notice coordinates are 
				//inside of the screen save and the box
				//the 5th parameter is a memvar (vfel) that
				//will hold the pick list row the user 
				//selected, or zero if they hit escape.
if vfel==0			//if they hit escape 
   restore screen from vfel_scr	//restore screen to previous state
   return .f.			//abandon function and sent .f. to the get 
				//handler; this should make the previous get
				//active. Test it and see... if not it will
				//simply re-launch this function. Let me know 
				//if the behavoir at this point works for you.
endif	
mfelony:=left(wch[vfel],1)	//set value of the get variable to the first
				//character of the row selected
restore screen from vfel_scr	//restore screen to previous state
@ xr,xc say mfelony		//at the screen positions of the get print 
				//the first character of the row selected
return .t.			//return .t. to the get stack. this will make
				//the mfelony get in focus with the 
				//pre-validation satisfied.
[/small]

Lyndon

---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top