scrollbars on tFolderEx

scrollbars on tFolderEx

Postby chiaiese » Fri Aug 30, 2024 10:05 am

Hi,
Is it possibile to enable scrollbars on tFolderex control?
the situation: I have an MdiChild container with a Browse on the left and a FolderEx control on the right, the two controls are divided by a Splitter, see some samples in the picture below.
So the tFolderex control is resizeable in every direction (as the browse) and I would like to put scrollbars on it to see the content without enlarge the whole window.
I have changed the style of every dialog in the tFolderex control to paint the bars but they doesn't work (do nothing when i scroll them).
How can I solve the problem?
Roberto

Image
Roberto Chiaiese
R&C Informatica S.n.c.
http://www.recinformatica.it
info@recinformatica.it
chiaiese
 
Posts: 82
Joined: Wed Feb 08, 2006 10:32 pm
Location: Roma, Italia

Re: scrollbars on tFolderEx

Postby chiaiese » Mon Sep 02, 2024 5:07 pm

Hello, any suggestions?

Roberto
Roberto Chiaiese
R&C Informatica S.n.c.
http://www.recinformatica.it
info@recinformatica.it
chiaiese
 
Posts: 82
Joined: Wed Feb 08, 2006 10:32 pm
Location: Roma, Italia

Re: scrollbars on tFolderEx

Postby Antonio Linares » Mon Sep 02, 2024 5:09 pm

Dear Roberto,

> I have changed the style of every dialog in the tFolderex control to paint the bars but they doesn't work (do nothing when i scroll them)

Do you have an example for this ? thank you
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41866
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: scrollbars on tFolderEx

Postby chiaiese » Mon Sep 02, 2024 8:19 pm

hello Antonio,
first of all, thank you for your answer.
Here's the modified code from tFolderEx Class:

Code: Select all  Expand view

#ifdef RECINFORMATICA
// add: lHBar, lVBar - barre di scorrimento
METHOD New( nTop, nLeft, nWidth, nHeight, oWnd, aBitmaps, lPixel,;
            lDesign, aPrompts, nFolderHeight, ;
            aHelps, nRound, bAction, bClrTabs, bClrText, aAlign, ;
            lAdjust, nSeparator, nOption, bPopUp, lStretch, ;
            cLayOut, bBmpAction, nBright, lAnimate, nSpeed, oFont, ;
            lTransparent, aDialogs, lBorder, nClrPane, cVarName, lHBar, lVBar ) CLASS TFolderEx //-->> byte-one 2010
#else
METHOD New( nTop, nLeft, nWidth, nHeight, oWnd, aBitmaps, lPixel,;
            lDesign, aPrompts, nFolderHeight, ;
            aHelps, nRound, bAction, bClrTabs, bClrText, aAlign, ;
            lAdjust, nSeparator, nOption, bPopUp, lStretch, ;
            cLayOut, bBmpAction, nBright, lAnimate, nSpeed, oFont, ;
            lTransparent, aDialogs, lBorder, nClrPane, cVarName ) CLASS TFolderEx //-->> byte-one 2010
#endif
...
...

   for n = 1 to nLen

    #ifdef RECINFORMATICA                   // 30/08/2024
        default lHBar := .f.
        default lVBar := .f.
        DEFINE DIALOG oDlg OF Self STYLE nOR( WS_CHILD, If( ! ::oWnd:IsKindOf( "TDIALOG"), WS_CLIPCHILDREN, 0 ),;
                                        if(lHBar, WS_HSCROLL, 0), if(lVBar, WS_VSCROLL, 0));
         FROM 0, 1 TO ::nHeight(), ::nWidth() PIXEL ;
         FONT ::ownd:oFont ;
         HELPID If( Len( ::aHelps ) >= n , ::aHelps[ n ] , NIL )

    // following lines have no effect!! 
        if lVBar
            DEFINE SCROLLBAR oDlg:oVScroll VERTICAL OF oDlg
            oDlg:oVScroll:SetRange( 1, ::nHeight() )
        endif
        if lHBar
            DEFINE SCROLLBAR oDlg:oHScroll HORIZONTAL OF oDlg
            oDlg:oHScroll:SetRange( 1, ::nWidth() )
        endif

    #else
        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 )
    #endif

      oDlg:SetBrush( ::oBrush )
      ::aDialogs[ n ] = oDlg

      oDlg:cVarName := "Page" + AllTrim( Str( n ) )
      oDlg:Hide()
      // oDlg:lTransparent := .T.

   next
 


now the scrollbars appear but if I shrink the window or move the splitter they still are not active, nor if I drag the thumbs neither if I scroll the mouse wheel

Roberto
Roberto Chiaiese
R&C Informatica S.n.c.
http://www.recinformatica.it
info@recinformatica.it
chiaiese
 
Posts: 82
Joined: Wed Feb 08, 2006 10:32 pm
Location: Roma, Italia

Re: scrollbars on tFolderEx

Postby Antonio Linares » Tue Sep 03, 2024 6:05 am

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41866
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: scrollbars on tFolderEx

Postby Antonio Linares » Tue Sep 03, 2024 6:05 am

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41866
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: scrollbars on tFolderEx

Postby Silvio.Falconi » Tue Sep 03, 2024 6:32 am

chiaiese wrote:Hi,
Is it possibile to enable scrollbars on tFolderex control?
the situation: I have an MdiChild container with a Browse on the left and a FolderEx control on the right, the two controls are divided by a Splitter, see some samples in the picture below.
So the tFolderex control is resizeable in every direction (as the browse) and I would like to put scrollbars on it to see the content without enlarge the whole window.
I have changed the style of every dialog in the tFolderex control to paint the bars but they doesn't work (do nothing when i scroll them).
How can I solve the problem?
Roberto

Image


Roberto,
I can't figure out where the problem is without a minimal test, and anyway I don't understand where the tfolderex would be in the figure
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
User avatar
Silvio.Falconi
 
Posts: 6910
Joined: Thu Oct 18, 2012 7:17 pm

Re: scrollbars on tFolderEx

Postby chiaiese » Tue Sep 03, 2024 2:30 pm

Hi Silvio,
in the first and third windows, on the right side of the browse we have a tFolderEx object ('Descrizione' and 'Anteprima' folders).
Well, after the controls are first painted on it, we can resize the windows or move the splitter. As you can see, in the folder in the first window the memo field is partially hide at the bottom.
In some cases I can do a resize of the control (see the image on the third window) but if I have simple tSay objects in the folder this may be more difficult and make the text unreadable.
Also notice that when the windows are closed, I save their coordinates and the splitter and toolbar position to restore them at the next open. So can happen that some says at the bottom of the tFolderEx dialog are never displayed until the window is maximized.
For these reasons I would like to have scroll bars inside the folder dialogs to see the entire contents without have to enlarge the windows

Roberto
Roberto Chiaiese
R&C Informatica S.n.c.
http://www.recinformatica.it
info@recinformatica.it
chiaiese
 
Posts: 82
Joined: Wed Feb 08, 2006 10:32 pm
Location: Roma, Italia

Re: scrollbars on tFolderEx

Postby Silvio.Falconi » Wed Sep 04, 2024 6:28 am

I had to enlarge the image to find the tfolderex.
anyway it seems to me too many things in one window, I'm talking to you from the user's point of view, I would have done it in another way but if that's what you see if Antonio finds the solution
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
User avatar
Silvio.Falconi
 
Posts: 6910
Joined: Thu Oct 18, 2012 7:17 pm

Re: scrollbars on tFolderEx

Postby karinha » Wed Sep 04, 2024 11:10 am

Good morning in the folder, "Anteprima" what control do you use to show the Image to show the invoice?

Buenos días en la carpeta "Anteprima" ¿qué control utiliza para mostrar la Imagen para mostrar la factura?

Gracias, tks.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7627
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: scrollbars on tFolderEx

Postby chiaiese » Wed Sep 04, 2024 2:36 pm

Karinha,
it is a tImage control, I use ImageMagick in background to create the preview when the document file is dropped or just created from the app.
Just double-click the preview to open attached documents with their predefined apps (images, text, pdf or whatever you want)

Roberto
Roberto Chiaiese
R&C Informatica S.n.c.
http://www.recinformatica.it
info@recinformatica.it
chiaiese
 
Posts: 82
Joined: Wed Feb 08, 2006 10:32 pm
Location: Roma, Italia

Re: scrollbars on tFolderEx

Postby karinha » Wed Sep 04, 2024 3:17 pm

Why don't you use a TBITMAP? Much simpler to control.

¿Por qué no utilizas un TBITMAP? Mucho más sencillo de controlar.

https://imgur.com/dQPaazc

Image

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7627
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: scrollbars on tFolderEx

Postby chiaiese » Wed Sep 04, 2024 4:22 pm

Karinha,
I don't use Resource Workshop or other tools to design windows and controls, I think it wastes a lot of time.
I use classes that defines the behavior and positioning of objects by source.
So I use the control objects that seems more complete and gives me more possibilities, once programmed they work on their own.

Here is how I define the content of the 'clip' object (the right panel in the window)

Code: Select all  Expand view

Method SetClip()
::oClip:lFolder := .t.

::oClip:addFld( CEditFld():New( "ImageName" ,"File:",, .f. ))       // thi is a simple tSay object
::oClip:Getfld("ImageName"):bData := {|| (::nArea)->(basename(trim(PathFile)+PATHTHUMB+"s"+trim(NomeFile))+THUMBEXT) }

::oClip:addFld( CEditFld():New( "Image" ,"Img.:",, .f. ))
::oClip:Getfld("Image"):bData := {|| (::nArea)->(basename(trim(PathFile)+PATHTHUMB+"s"+trim(NomeFile))+THUMBEXT) }
::oClip:Getfld("Image"):nType := OCTRL_IMAGE             // here I define that I want to display the image

::oClip:bOnDisp := {|oCl,lSet| ::OnDisp(oCl,lSet) }              // everytime the control is updated
return (Self)

******************************************************************************
Method OnDisp(oClip,lSet)
if lSet
    oClip:getFld("Image"):oCtrl:blDblClick := {||::display() }                // open the document
    oClip:getFld("Image"):oCtrl:oCursor := TCursor():New(,"Hand")
endif
return (nil)
 


that's all, nothing to draw, objects and controls are managed by the <oClip> object
Roberto Chiaiese
R&C Informatica S.n.c.
http://www.recinformatica.it
info@recinformatica.it
chiaiese
 
Posts: 82
Joined: Wed Feb 08, 2006 10:32 pm
Location: Roma, Italia

Re: scrollbars on tFolderEx

Postby Silvio.Falconi » Wed Sep 04, 2024 4:58 pm

karinha wrote:Why don't you use a TBITMAP? Much simpler to control.

¿Por qué no utilizas un TBITMAP? Mucho más sencillo de controlar.

https://imgur.com/dQPaazc

Image

Regards, saludos.

Sorry karinha how run the resource Borland on 32/64 bit (win 7/10) ?
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
User avatar
Silvio.Falconi
 
Posts: 6910
Joined: Thu Oct 18, 2012 7:17 pm

Re: scrollbars on tFolderEx

Postby karinha » Wed Sep 04, 2024 5:08 pm

Good afternoon Silvio, you can use the EMULATOR to run the 16-bit Workshop.exe on Windows 64, or directly use the 32-bit Workshop.exe, the choice is yours.

Buenas tardes Silvio, puedes usar el EMULADOR para ejecutar el Workshop.exe de 16 bits en Windows 64, o directamente usar el Workshop.exe de 32 bits, la elección es tuya.

Emulator for WorkSop.exe 16 bits:

https://fivewin.com.br/index.php?/topic/30233-contribui%C3%A7%C3%A3o-workshop-rodar-em-windows-64-bits/#comment-291687

WorkShop.exe de 32 bits:

https://fivewin.com.br/index.php?/topic/41028-ferramenta-borland-workshop-32bits/#comment-306216

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7627
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 26 guests