tem como quando o usuario chegar no get ser apresentado um menu de opcao?
se sim, qtas opcoes no maximo.
valeu
Moderador: Moderadores


Código: Selecionar todos
nColor := 1 //default to the first item.
@ 5, 20, 8, 28 GET nColor LISTBOX { "Red", Green", "Blue" }


Código: Selecionar todos
#include "Box.Ch"
LOCAL cSexo := "M", GetList := {}
CLS
@ 10,10 Say "Sexo" Get cSexo WHEN { |oGet| Valtype( ValidaSexo( oGet ) ) = NIL }
ReadModal( GetList ) ; GetList := {}
RETURN
// -------------------------------------------------------------------------------------
FUNCTION ValidaSexo( oGet )
LOCAL nTop, nLeft, nBottom, nRight, aOptions, nLen := 0
aOptions := { " Masculino ", " Feminino " }
nTop := oGet:row + 1
nLeft := oGet:col + 2
nBottom := nTop + 3
AEval( aOptions, { |e| nLen := If( Len( e ) > nLen, Len( e ), nLen ) } )
nRight := nLeft + nLen + 2
DispBox( nTop, nLeft, nBottom, nRight, B_SINGLE + " " )
nLen := AChoice( nTop + 1, nLeft + 1, nBottom -1, nRight - 1, aOptions, .T. )
IF nLen > 0
oGet:varput( Left( LTrim( aOptions[ 1 ] ), 1 ) )
oGet:updateBuffer()
@ oGet:row, oGet:col + 1 Say " -" + aOptions[ nLen ]
ENDIF
RETURN nLen
// -------------------------------------------------------------------------------------