Podría alguien explicarme por qué funciona bien el siguiente código?
El caso es que el XBrowse no existe en recursos, mucho menos el ID 180.
aArray es un array de un solo elemento con varias filas {1,2,3,4,5,6}, oVent es un boton desde otro dialogo.
- Code: Select all Expand view
- //---------------------------------//
Function Prueba(aArray,oVent)
local oBrw, oDlg, n
local aRect := GetWndRect( oVent:hWnd )
DEFINE DIALOG oDlg SIZE 100,100 PIXEL STYLE nor( WS_POPUP, WS_VISIBLE, WS_BORDER)
REDEFINE XBROWSE oBrw ID 180 OF oDlg ;
ARRAY aArray
ACTIVATE DIALOG oDlg ;
ON INIT ( oDlg:nWidth := oVent:nWidth, oDlg:nHeight:=oBrw:nRowHeight*oBrw:nLen ,;
oBrw:SetSize( oDlg:nWidth,oDlg:nHeight ) ,;
oDlg:Move(aRect[1] + oVent:nHeight-1, aRect[2]) )
Return nil
Saludos.