The first scrollpanel ( a left) is ok .
the second ScrollPanel ( at right) I not see the scroll ( because I not Know the right position)
Can you help me pls ?
the test
- Code: Select all Expand view RUN
#include "fivewin.ch"
REQUEST DBFCDX
//----------------------------------------------------------------------------//
function Main()
local oWnd,oBar
local oDash_Left,oDash_Right
DEFINE WINDOW oWnd TITLE "Test silvio" //MDI
DEFINE BUTTONBAR oBar OF oWnd 2015 SIZE 70, 60
oDash_Left := Create_Scroll(oWnd,nRgb( 255,255,255), nRgb(240,240,240),oBar,1)
oDash_Right := Create_Scroll(oWnd, RGB(143,172,230), nRgb(255,255,255),oBar,2)
DEFINE MSGBAR PROMPT "Test " OF oWnd 2015 KEYBOARD DATE
PlaceControls( oDash_Left, oDash_Right )
oWnd:bResized := {|| (oDash_Left:nHeight := oWnd:nHeight - 125 ,;
oDash_Left:nWidth := oWnd:nWidth/2 +100 ,;
oDash_Left:Refresh() ,;
oDash_right:nHeight := oWnd:nHeight - 125,;
oDash_right:nLeft := oDash_Left:nWidth+10,;
oDash_right:nWidth := oWnd:nWidth-520 ,;
oDash_right:Refresh(),;
oDash_Left:Checkresize(),;
oDash_Right:Checkresize() )}
oWnd:aMinMaxInfo := { nil, nil, ,, 1130,650, , }
ACTIVATE WINDOW oWnd MAXIMIZED
RETURN NIL
//----------------------------------------------------------------------//
Function Create_Scroll(oWnd,nColor1,nColor2,oBar,nMode)
local oPanel
local aGradBox := { nColor1,nColor2}
local oBrush
local aClient := GetClientRect (oWnd:hWnd )
local nRight := (aClient[4]/2)
DEFINE BRUSH oBrush GRADIENT aGradBox
Do case
case nMode == 1
oPanel := TScrollPanel():New(oBar:nheight,1,oWnd:nBottom,oWnd:nWidth/2 +100,oWnd, .t.)
case nMode == 2
oPanel := TScrollPanel():New(oBar:nheight,300,oWnd:nBottom,nRight,oWnd, .t.)
Endcase
oPanel:SetBrush( oBrush )
RETURN oPanel
//----------------------------------------------------------------------//
function PlaceControls( oPanelR, oPanelL ) //demo
local nRow := 30
@ nRow, 20 SAY "First :" SIZE 080,24 PIXEL OF oPanelR RIGHT TRANSPARENT
nRow += 30
@ nRow, 20 SAY "Last :" SIZE 080,24 PIXEL OF oPanelR RIGHT TRANSPARENT
nRow += 30
@ nRow, 20 SAY "Street :" SIZE 080,24 PIXEL OF oPanelR RIGHT TRANSPARENT
nRow += 30
@ nRow, 20 SAY "City :" SIZE 080,24 PIXEL OF oPanelR RIGHT TRANSPARENT
nRow += 30
@ nRow, 20 SAY "State :" SIZE 080,24 PIXEL OF oPanelR RIGHT TRANSPARENT
nRow := 10
@ nRow, 20 SAY "Zip :" SIZE 080,24 PIXEL OF oPanelL RIGHT TRANSPARENT
nRow += 30
@ nRow, 20 SAY "HireDate :" SIZE 080,24 PIXEL OF oPanelL RIGHT TRANSPARENT
nRow += 30
@ nRow, 20 SAY "Married :" SIZE 080,24 PIXEL OF oPanelL RIGHT TRANSPARENT
nRow += 30
@ nRow, 20 SAY "Age :" SIZE 080,24 PIXEL OF oPanelL RIGHT TRANSPARENT
nRow += 30
@ nRow, 20 SAY "Salary :" SIZE 080,24 PIXEL OF oPanelL RIGHT TRANSPARENT
nRow += 30
@ nRow, 20 SAY "Notes :" SIZE 080,24 PIXEL OF oPanelL RIGHT TRANSPARENT
oPanelR:SetRange() // call this after defining all controls
oPanelL:SetRange() // call this after defining all controls
return ni