Antonio Linares wrote:Dear Roberto,Antonio,
If you want to scroll the dialog contents in a TFolderEx control probably using a TScrollPanel is the way to go.
We are going to test it and share an example
Please wait for us, thank you
I did it!
As you suggest I used TScrollPanel to make folders scrollable and, with a few modifications in the container object to manage window and splitter resizing, now it works.
All the controls are now painted on the TScrollPanel instead of the FolderEx dialogs
Only, it would be nice to have horizontal scrollBars too...
here is the code I modified in the TFolderEx():New() method:
for n = 1 to nLen
DEFINE DIALOG oDlg OF Self STYLE nOR( WS_CHILD, If( ! ::oWnd:IsKindOf( "TDIALOG"), WS_CLIPCHILDREN, 0 ) );
FROM 0, 1 TO ::nHeight(), ::nWidth() PIXEL ;
FONT ::ownd:oFont ;
HELPID If( Len( ::aHelps ) >= n , ::aHelps[ n ] , NIL )
#ifdef RECINFORMATICA // 06/09/2024
default lHBar := .f.
default lVBar := .f.
if lVBar
oPanel := TScrollPanel():New( 1, 1, ::nHeight()-30, ::nWidth()-30, oDlg, .T. )
oPanel:SetColor( CLR_WHITE, nClrPane )
endif
#endif
oDlg:SetBrush( ::oBrush )
::aDialogs[ n ] = oDlg
oDlg:cVarName := "Page" + AllTrim( Str( n ) )
oDlg:Hide()
// oDlg:lTransparent := .T.
nextMethod GetWnd() CLASS CClip
local oWnd
if ::oFolder # NIL // folder non ancora creato
oWnd := if( ::lFolder, ::oFolder:aDialogs[::oFolder:nOption], ::oWnd )
#ifdef SCROLLCLIP
// add: 05/09/2024 gestione tScrollPanel() per <oClip>
if ::lFolder .and. ::oFolder:isKindof("TFOLDEREX") .and. !empty(oWnd:aControls) .and. oWnd:aControls[1]:isKindof("TSCROLLPANEL")
oWnd := oWnd:aControls[1]
endif
#endif
endif
Return (oWnd)