Page 1 of 1

scroll on folder

PostPosted: Fri Feb 09, 2018 9:49 am
by Silvio.Falconi
when I resize my window test I saw the folder not have the vertical scrollbar to show also all the controls I insert on that folder

Image

any solution ?

Re: scroll on folder

PostPosted: Fri Feb 09, 2018 10:17 am
by Antonio Linares
Silvio,

You have to use WS_VSCROLL style on your folder pages RC definitions

Re: scroll on folder

PostPosted: Fri Feb 09, 2018 12:02 pm
by Silvio.Falconi
Sorry I use @x,y no resource

Re: scroll on folder

PostPosted: Fri Feb 09, 2018 2:18 pm
by AntoninoP
I am not sure (i did not try) mut in this case you should use the method winstyle:

Code: Select all  Expand view
oFolder:winStyle(WS_VSCROLL,.t.)


and you obtain the scroll in this way:
Code: Select all  Expand view
DEFINE SCROLLBAR oVScroll VERTICAL OF oFolder


WS_VSCROLL is defined in winapi.ch:
Code: Select all  Expand view
#define WS_VSCROLL           2097152  // 0x00200000L


Ciao silvio :D

Re: scroll on folder

PostPosted: Sat Feb 10, 2018 9:43 am
by Silvio.Falconi
nada
no funciona
does not work
он не работает
het werkt niet
nó không hoạt động
es funktioniert nicht

Re: scroll on folder

PostPosted: Sat Feb 10, 2018 10:15 am
by Silvio.Falconi
only with this command can I see the scroll, the vertical scroll is shown even when it should not be shown

oApp():oFolder:adialogs[1]:nSTYLE := nOR( WS_CHILD, WS_VSCROLL )

it show vertical scroll on first tab

when I click on the scroll button I can not see the other controls

i think the tfolder class has to be re-edited so that when it gets smaller, it automatically create the scroll and scroll all the controls that are on the tabs. in particular the last control must be extended until the end of the obj folder

Re: scroll on folder

PostPosted: Sun Feb 11, 2018 4:08 pm
by Silvio.Falconi
On explorer bar there is a dispositive create a vertical scroll when we resize it...why we cannot insert it on folder class ?

here a test ( but not run)

#include "fivewin.ch"
#include "constant.ch"

#define WS_VSCROLL 2097152 // 0x00200000L

Function test()
Local oDlg,oFolder,oVScroll
Local nBottom := 33
Local nRight := 115
Local nWidth := Max( nRight * DLG_CHARPIX_W, 180 )
Local nHeight := nBottom * DLG_CHARPIX_H
local noption := 1

DEFINE DIALOG oDlg ;
TITLE "test folder" ;
SIZE nWidth, nHeight TRANSPARENT PIXEL

@ 10,10 FOLDER oFolder of oDlg ;
ITEMS "Anagrafica","Rapporti Commerciali","Varie" ;
SIZE 100,200 PIXEL

oFolder:adialogs[nOption]:nSTYLE := nOR( WS_CHILD, WS_VSCROLL, WS_HSCROLL )

DEFINE SCROLLBAR oVScroll VERTICAL OF oFolder

oFolder:winStyle(WS_VSCROLL,.t.)

oDlg:nStyle := nOr( WS_OVERLAPPED,WS_THICKFRAME,WS_MAXIMIZEBOX, 0 )

ACTIVATE DIALOG oDlg CENTERED

return nil