[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Function PULLDN()
Action Pulldown menu creator, handler
Returns A number in the form menu.prompt (i.e. 2.04)
Category Menu
Syntax <expN> = PULLDN(<expN>,<array1>,[array2],[array3])
Description Draws a pulldown menu with up to 8 seperate
boxes. Selection process starts with <expN>.
Each element of <array1> defines a menu.
A menu definition is a delimited string in the
form "TITLE:prompt:prompt:prompt" with up to 99
prompts per string.
Options [array2] is a box definition array. It is 7
elements long and defines the following:
Element: 1. <expL> Draw top bar box? T/F
2. <expC> Top bar color
3. <expC> Menu Box color
4. <expC> Menu Box frame
5. <expN> Menu Box shadow position
(0,1,3,7,9)
6. <expN> Menu Box shadow attribute
7. <expN> Row to start menu bar
[array3] is an array of title column positions
to override the internal 'figerin algorithm.
Examples
declare box[6],bdata[7]
box[1] = "Datafiles:Use Datafile"
box[2] = "Indices:Select Indices:Index order"
box[3] = "Editing:Field Replacement:Tabular Edit"
box[4] = "Reporting:Build Query:Print Lists"
box[5] = "Other:List text file:Change Directory"
box[6] = "Quit"
sf_sel = 1.01
*- define menu boxes
bdata[1]= .t. && draw the top bar box
bdata[2]= 'W/B,GR/R,,,W/N' && top bar color string
bdata[3]= 'W/B,N/R,,,W/N' && drop box color
bdata[4]= "+-+|+-+| " && drop box frame
bdata[5]= 3 && drop box shadow position
bdata[6]= 8 && drop box shadow attribute
bdata[7]= 0 && row # of menu bar
do while .t.
sf_sel = PULLDN(sf_sel,box,bdata)
do case
case sf_sel = 1
case sf_sel = 2
case sf_sel = 3
case sf_sel = 4
endcase
enddo
Notes First letter selection takes place on the following
priority: next matching element first letter, next
matching box title first letter.
Passing a menu array element with title only will
result in no menu box, with the title being
the only selection and returning a selection
value of <MENU>.1.
(i.e. a 'Quit' box)
Warnings It takes some work to start all options and
titles with a first letter that is unique so that
first letter selection may take place.
Warnings Cursor is left ON
Found in (prg)......S_PULLDN.PRG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson