Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Browse Name Foo
Foo.Rowheight = Foo.Rowheight * 2
* etc.
RAND(-1)
CREATE CURSOR aa (ii I AUTOINC, aa C(10) DEFAULT SYS(2015),bb M DEFAULT genstring())
FOR lni=1 TO 10
APPEND BLANK
NEXT
BROWSE NOWAIT NAME grd
grd.column3.removeobject("text1")
grd.column3.addobject("edt","editbox")
grd.column3.edt.visible=.T.
grd.column3.currentcontrol="edt"
grd.column3.width=400
grd.rowheight=100
grd.column3.sparse=.F.
FUNCTION genstring
LOCAL lnLen,lni,lcS,lnChar
lcS=""
lnLen=1+INT(1000*RAND())
FOR lni=0 TO m.lnLen
lnChar=INT(26*RAND())
lcS=m.lcS+IIF(m.lnChar=0,SPACE(1),CHR(64+m.lnChar))
NEXT
RETURN m.lcS
endfunc
I do this all the time but I reserve an area below the grid for the memo details, in an EDIT box
In the afterrowcolchange I issue a refresh
Browse Name Foo [COLOR=red]NOWAIT[/color]
RAND(-1)
CREATE CURSOR aa (ii I AUTOINC, aa C(10) DEFAULT SYS(2015),bb M DEFAULT genstring())
FOR lni=1 TO 100
APPEND BLANK
NEXT
GO TOP
BROWSE NOWAIT NAME grd
grd.column3.removeobject("text1")
grd.column3.addobject("edt","editbox")
grd.column3.edt.visible=.T.
grd.column3.edt.scrollbars=0 &&&&&
grd.column3.currentcontrol="edt"
grd.column3.width=400
grd.rowheight=100
grd.column3.sparse=.F.
FUNCTION genstring
LOCAL lnLen,lni,lcS,lnChar
lcS=""
lnLen=1+INT(1000*RAND())
FOR lni=0 TO m.lnLen
lnChar=INT(26*RAND())
lcS=m.lcS+IIF(m.lnChar=0,SPACE(1),CHR(64+m.lnChar))
NEXT
RETURN m.lcS
endfunc
a brows also is a grid you can address by using the NAME clause of BROWSE, or does this not apply to legacy Foxpro?
USE p:\apps\develop\dbf\iv_det.dbf IN 0 SHARED
USE p:\apps\develop\dbf\pro_pro1.dbf IN 0 SHARED
SET ORDER TO TAG Pro_no OF p:\apps\develop\dbf\pro_pro1.cdx IN Pro_pro1
Select iv_det
SET RELATION TO Iv_det.tv_prono INTO Pro_pro1 ADDITIVE
BROWSE NOMODIFY NODELETE NOAPPEND FIELDS pro_pro1.pro_name, Tv_REM, M_Rems = LEFT(TV_REM,100) :H='Remark' :100
CLEAR ALL
CLOSE ALL
USE p:\apps\develop\dbf\iv_det.dbf IN 0 SHARED
USE p:\apps\develop\dbf\pro_pro1.dbf IN 0 SHARED
SET ORDER TO TAG Pro_no OF p:\apps\develop\dbf\pro_pro1.cdx IN Pro_pro1
SET RELATION TO Iv_det.tv_prono INTO Pro_pro1 ADDITIVE
SELECT iv_det
M_OLDRMOUSE = ON("KEY","RIGHTMOUSE")
M_OLDENTER = ON("KEY","ENTER")
ON KEY LABEL RIGHTMOUSE KEYB CHR(23)
ON KEY LABEL ENTER KEYB CHR(23)
BROWSE NOMODIFY NODELETE NOAPPEND FIELDS pro_pro1.pro_name, Tv_REM :70 NAME oBrowseGrid NOWAIT
With oBrowseGrid.Column2
.Addobject("Edit1","Editbox")
.CurrentControl="Edit1"
.RemoveObject("Text1")
.Sparse=.F.
.Edit1.Visible = .T.
ENDWITH
oBrowseGrid.RowHeight= 30
ON KEY LABEL RIGHTMOUSE &M_OLDRMOUSE
ON KEY LABEL ENTER &M_OLDENTER