scrollbars on tFolderEx
Re: scrollbars on tFolderEx
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Re: scrollbars on tFolderEx
Antonio,Antonio Linares wrote:Dear Roberto,
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:
Code: Select all | Expand
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.
next
Code: Select all | Expand
Method 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)
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: scrollbars on tFolderEx
Excellent Roberto!
Class TScrollPanel needs to use WS_HSCROLL too and add an horizontal scrollbar:
DEFINE SCROLLBAR ::oVScroll VERTICAL OF Self RANGE 1,2
DEFINE SCROLLBAR ::oHScroll HORIZONTAL OF Self RANGE 1,2
You are very close to have it!
Class TScrollPanel needs to use WS_HSCROLL too and add an horizontal scrollbar:
DEFINE SCROLLBAR ::oVScroll VERTICAL OF Self RANGE 1,2
DEFINE SCROLLBAR ::oHScroll HORIZONTAL OF Self RANGE 1,2
You are very close to have it!
Re: scrollbars on tFolderEx
Antonio,
I already tried it but it seems that the ScrollPanel class has no methods to manage it:
where am I going wrong?
Do I have to write all the methods as for the vertical scrollbar?
regards
I already tried it but it seems that the ScrollPanel class has no methods to manage it:
Code: Select all | Expand
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 .or. lHBar
oPanel := TScrollPanel():New( 1, 1, ::nHeight()-30, ::nWidth()-30, oDlg, .T. )
oPanel:SetColor( CLR_WHITE, nClrPane )
// this does not work, they are not managed?
if lHBar
DEFINE SCROLLBAR oPanel:oHScroll HORIZONTAL OF oPanel RANGE 1,2
oPanel:nStyle := nOr( WS_CHILD, WS_VSCROLL, WS_HSCROLL,;
WS_VISIBLE, WS_TABSTOP, WS_CLIPCHILDREN )
oPanel:refresh()
endif
//
endif
#endif
oDlg:SetBrush( ::oBrush )
::aDialogs[ n ] = oDlg
oDlg:cVarName := "Page" + AllTrim( Str( n ) )
oDlg:Hide()
// oDlg:lTransparent := .T.
next
Do I have to write all the methods as for the vertical scrollbar?
regards
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: scrollbars on tFolderEx
I am afraid yes as it never had support for horizontal scroll
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: scrollbars on tFolderEx
I asked It much time ago....Antonio Linares wrote:I am afraid yes as it never had support for horizontal scroll
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Re: scrollbars on tFolderEx
Antonio
ok, I wrote the missing methods and now full scrolling is supported, even with mouse dragging.
If you wish I can send to you the modified full source code by mail
thank you for support
ok, I wrote the missing methods and now full scrolling is supported, even with mouse dragging.
If you wish I can send to you the modified full source code by mail
thank you for support
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: scrollbars on tFolderEx
Dear Roberto,
Great!!!
It is so encouraging when FWH users reach a real Masters level!
Yes please, send me the code and we will include it in FWH, big thank you!
Great!!!
It is so encouraging when FWH users reach a real Masters level!
Yes please, send me the code and we will include it in FWH, big thank you!
Re: scrollbars on tFolderEx
Hi Antonio,
did you received the source file?
I sent it to you on september 09
regards
Roberto
did you received the source file?
I sent it to you on september 09
regards
Roberto
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: scrollbars on tFolderEx
Dear Roberto,
I apologize as I may have missed it. Please resend it and we will include it
many thanks
I apologize as I may have missed it. Please resend it and we will include it
many thanks
Re: scrollbars on tFolderEx
done...
regards
Roberto
regards
Roberto
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: scrollbars on tFolderEx
Dear Roberto,
got it, many thanks!
got it, many thanks!