FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to code TScrDlg() for use in folder?
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
How to code TScrDlg() for use in folder?
Posted: Fri Nov 25, 2022 04:26 AM

Hi,

All samples I've looked at place calls to TScrDlg() at a dialog's ON INIT.

How should it be coded for use in a Folder/FolderEx?

TIA

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: How to code TScrDlg() for use in folder?
Posted: Fri Nov 25, 2022 08:38 AM
Tried
Code (fw): Select all Collapse
       
::oFolder:aDialogs[1]:bInit := {||  oScrDlg := TScrDlg():New(::oFolder:aDialogs[1],0,270,0,70) }
Why :bInit is not evaluated?
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: How to code TScrDlg() for use in folder?
Posted: Fri Nov 25, 2022 09:37 AM

What's better between TScrDlg() and TScrollPanel?

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: How to code TScrDlg() for use in folder?
Posted: Fri Nov 25, 2022 10:21 AM
Resolved.
Code (fw): Select all Collapse
ACTIVATE DIALOG oDlg ON INIT MakeScroll(oFolder)

PROC MakeScroll(oFolder)
  local oScrDlg
  oScrDlg := TScrDlg():New(oFolder:aDialogs[1],0,SCROLL_RANGE,0,70)
  oFolder:aDialogs[1]:bMouseWheel := { | nKey, nDelta, nXPos, nYPos | MouseWheel( nKey, nDelta, nXPos, nYPos, oScrDlg ) }
RETURN
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to code TScrDlg() for use in folder?
Posted: Fri Nov 25, 2022 12:10 PM
very good! :-)

many thanks for sharing it!
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: How to code TScrDlg() for use in folder?
Posted: Wed Nov 30, 2022 07:04 AM
When I added up to 10 RTF controls within the same page on the TFolderEx,
the screen painting starts to become weird and folder names got painted where it shouldn't exist.

How to fix this?

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to code TScrDlg() for use in folder?
Posted: Wed Nov 30, 2022 09:39 AM

Dear Hua,

Could you please provide us your PRG example to test it here ?

many thanks

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: How to code TScrDlg() for use in folder?
Posted: Thu Dec 01, 2022 10:11 AM
Hi Antonio,
I created a self-contained sample. It can be downloaded from here https://drive.google.com/file/d/1aBL3nnjmVD5B3NE1424M4biQUhY0OF6w/view?usp=share_link
The paths in the .mak file would need to be updated first though

TIA
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to code TScrDlg() for use in folder?
Posted: Thu Dec 01, 2022 12:06 PM

Dear Hua,

I have been able to build you example and see wht you mean

Please try to reduce the height used by TScrDlg()

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: How to code TScrDlg() for use in folder?
Posted: Fri Dec 02, 2022 09:40 AM
No joy.
Antonio Linares wrote: Please try to reduce the height used by TScrDlg()
I reduced the controls from 10 to 7 sets. Seems painting issue is consistent.
There will be extra bits painted near the 5th, 7th and 10th TTitle

FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to code TScrDlg() for use in folder?
Posted: Fri Dec 02, 2022 10:21 AM

Please try to reduce the height of TScrDlg(), let the controls as they are

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Re: How to code TScrDlg() for use in folder?
Posted: Thu Dec 15, 2022 09:26 AM
Workaround the issue by not using Shadow
Code (fw): Select all Collapse
  REDEFINE TITLE oTitle ID 123 of oDlg SHADOW NOSHADOW
hua wrote:No joy.
Please try to reduce the height used by TScrDlg()
I reduced the controls from 10 to 7 sets. Seems painting issue is consistent.
There will be extra bits painted near the 5th, 7th and 10th TTitle
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to code TScrDlg() for use in folder?
Posted: Thu Dec 15, 2022 10:32 AM
very good :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion