I wish have on orizontal and vertical scroll only for the tpanel
When I create the panel the scrollbar are not created
I use the class TScrWnd() to create vscroll and hscroll
this the small test I made
- Code: Select all Expand view RUN
#include"fivewin.ch"
#define COLORE_SABBIA nRGB(255,221,187)
static TOTY , TOTX, oScrWnd,cDbfPath,cIniFile
Function Test()
Local oDlg,oPanel
cDbfPath := cFilePath(GetModuleFileName( GetInstance() )) + "Data\"
cIniFile := cFilePath( GetModuleFileName( GetInstance() ) ) + "Beach.ini"
cBackBrush := GetIni( cInifile, "Beach", "BackBmp", ".\bitmaps\spiaggia.bmp" )
TOTX := 40
TOTY := 20
DEFINE DIALOG oDlg SIZE 1100,700 TRANSPARENT;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
WS_MAXIMIZEBOX, WS_MINIMIZEBOX, WS_THICKFRAME )
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT (oPanel:=CreatePanel( oDlg),;
oScrWnd:=TScrWnd():New( oPanel,1,TOTY,1,TOTX))
RETURN NIL
///-------------------------------------------------------------------/
Function CreatePanel( oDlg)
local oPanel,oBrushSabbia,oBtn
local nSplit:=175
DEFINE BRUSH oBrush1 COLOR COLORE_SABBIA
oDlg:aMinMaxInfo := { nil, nil, nil, nil, 878, 570, nil, nil } //878, 570
oPanel:= TPanel():New(40,nSplit+5,oDlg:nbottom-50,oDlg:nWidth-50,oDlg)
oPanel:SetBrush(oBrush1)
oPanel:WinStyle(WS_BORDER, .t.)
oPanel:WinStyle(WS_VSCROLL, .t.)
oPanel:WinStyle(WS_HSCROLL, .t.)
@ 10,10 BTNBMP oBtn;
SIZE oPanel:nWidth, 50 PIXEL;
FLAT ;
PROMPT "e" RIGHT;
OF oPanel
return oPanel
FUNCTION GetIni( cIni, cSection, cEntry, xDefault )
LOCAL oIni
LOCAL xVar := xDefault
// DEFAULT cIni := oApp:cIniFile
INI oIni FILE cIni
GET xVar ;
SECTION cSection ;
ENTRY cEntry ;
DEFAULT xDefault ;
OF oIni
ENDINI
RETURN xVar
the scrollPanel class create only with Vertical scroll ?