Ejemplo
PUBLIC goMiFormgoMiForm = CREATEOBJECT("MiForm")
goMiForm.SHOW(1)
RETURN
DEFINE CLASS MiForm AS FORM
AUTOCENTER = .T.
CAPTION = "Ejemplo de Autocompletar en TextBox"
NAME = "MiForm"
ADD OBJECTtxtCompania AS TEXTBOX WITH ;
HEIGHT = 24, ;
LEFT = 84, ;
TOP = 24, ;
WIDTH = 264, ;
NAME = "txtCompania"
ADD OBJECT txtContacto AS TEXTBOX WITH ;
HEIGHT = 24, ;
LEFT= 84, ;
TOP = 72, ;
WIDTH = 264, ;
NAME = "txtContacto"
ADD OBJECT txtCiudad AS TEXTBOX WITH ;
HEIGHT = 24, ;
LEFT = 84, ;
TOP = 120, ;
WIDTH = 264, ;
NAME ="txtCiudad"
ADD OBJECT txtPais AS TEXTBOX WITH ;
HEIGHT = 24, ;
LEFT = 84, ;
TOP = 168, ;
WIDTH = 264, ;
NAME = "txtPais"
ADD OBJECT lblCompania AS LABEL WITH ;AUTOSIZE = .T., ;
BACKSTYLE = 0, ;
CAPTION = "Compañia", ;
LEFT = 12, ;
TOP = 28, ;
NAME = "lblCompania"
ADD OBJECT lblContacto AS LABEL WITH ;
AUTOSIZE = .T., ;BACKSTYLE = 0, ;
CAPTION = "Contacto", ;
LEFT = 12, ;
TOP = 76, ;
NAME = "lblContacto"
ADD OBJECT lblCiudad AS LABEL WITH ;
AUTOSIZE = .T., ;
BACKSTYLE = 0, ;CAPTION = "Ciudad", ;
LEFT = 12, ;
TOP = 124, ;
NAME = "lblCiudad"
ADD OBJECT lblPais AS LABEL WITH ;
AUTOSIZE = .T., ;
BACKSTYLE = 0, ;
CAPTION = "País", ;
LEFT = 12,;
TOP = 172, ;
NAME = "lblPais"
PROCEDURE INIT
LOCAL lcDbfAuto, lcDbfOrigen
*-- Ruta y nombre de la tabla AutoCompletar
lcDbfAuto = ADDBS(SYS(2023)) + "MiAutoComp.dbf"*-- Creo la tabla AutoCompompletar
THISFORM.CrearTablaAutoComp(lcDbfAuto)
*-- Ruta y nombre de la tabla Origen
lcDbfOrigen = ADDBS(HOME(2))+ "NorthWind\Customers.dbf"
*--...
Regístrate para leer el documento completo.