Parece que hoy me desperté con el espíritu de molestar
![Embarassed :oops:](./images/smilies/icon_redface.gif)
Hay forma de especificar que el alto del renglón en xBrowse se auto ajuste
si se trata de un campo tipo MEMO?, de forma tal que todo el contenido
del campo se muestre en la columna.
Saludos
//-----------------------------------------------//
Function BrwImagen2()
local oDlg, oBrw, oFont, oBold
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12
DEFINE FONT oBold NAME "VERDANA" SIZE 0,-13 BOLD
USE "C:\FWH1709\SAMPLES\WWONDERS" NEW
DEFINE DIALOG oDlg SIZE 800,600 TITLE "Image and Text in same cell" PIXEL TRUEPIXEL
oDlg:SetFont( oFont )
@ 0,0 XBROWSE oBrw OF oDlg DATASOURCE "WWONDERS" ;
COLUMNS "NAME","DETAILS" COLSIZES 200, 250 ;
LINES NOBORDER
WITH OBJECT oBrw
:nRowHeight := 140
WITH OBJECT :aCols[ 1 ]
:bStrImage := { || FIELD->IMAGE }
:oDataFont := oBold
:nDataStrAlign := AL_CENTER + AL_BOTTOM
:nDataBmpAlign := AL_CENTER
:aImgRect := { nil, nil, -40, nil }
END
WITH OBJECT :aCols[ 2 ]
:nWidth := 400
END
//
:CreateFromCode()
END
oDlg:oClient := oBrw
oDlg:nHeight := 700
ACTIVATE DIALOG oDlg CENTERED ON INIT AjustAltoLinea(oBrw)
RELEASE FONT oFont, oBold
WWONDERS->(DbCloseArea())
return nil
//-----------------------------------------------// Ajustar altura de linea
Function AjustAltoLinea(oBrw)
local n, nL:= 1, nHt := oBrw:oFont:nHeight + 4
For n := 1 to oBrw:nLen
nL := Max( MLCount( oBrw:aCols[2]:Value ), nL )
oBrw:GoDown()
Next
oBrw:nRowHeight := ( nL * nHt)
Return nil
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: Google [Bot] and 52 guests