1. the brush of PanelScroll is black while I insert a gradient color
2. when resize the dialog the panel scroll make error
this is the test
- Code: Select all Expand view RUN
- #include "fivewin.ch"
#include "constant.ch"
Function Test()
Local oDlg,oFont
Local nBottom := 28.4
Local nRight := 78.7
local nWidth := Max( nRight * DLG_CHARPIX_W, 180 )
local nHeight := nBottom * DLG_CHARPIX_H
Local oBtnHelp,oBtnOK,oBtnClose
local oPanel
local oBrushWhite
local aGradientColor := { { 1, RGB( 216, 230, 238 ), RGB( 103, 154, 194 ) } }
local nMINWidth := 628
local nMINHeight := 570
local nMAXWidth := GETSYSMETRICS( 0 ) //risoluzione orizzontale
local nMAXHeight := GETSYSMETRICS( 1 ) //risoluzione verticale
DEFINE BRUSH oBrushWhite GRADIENT aGradientColor
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE DIALOG oDlg SIZE nWidth, nHeight PIXEL;
FONT oFont Title "Servizi Singoli" ;
STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
WS_MAXIMIZEBOX, WS_MINIMIZEBOX, WS_THICKFRAME )
oPanel:= TScrollPanel():New(40,5,100,308, oDlg, .t.)
oPanel:SetBrush( oBrushWhite )
oPanel:bPainted := { || oPanel:Box( 1,1,oPanel:nHeight-1,oPanel:nWidth-1 ) }
@ 10,250 BUTTON oBtnHelp PROMPT "Help" SIZE 40,15 PIXEL OF oDlg
@ 195,200 BUTTON oBtnOK PROMPT "&Confirm" SIZE 40,15 PIXEL OF oDlg ACTION oDlg:End()
@ 195,250 BUTTON oBtnClose PROMPT "&Exit" SIZE 40,15 PIXEL OF oDlg ACTION oDlg:End()
oDlg:aMinMaxInfo = { GETSYSMETRICS( 0 ), GETSYSMETRICS( 1 ),; // xMaxSize, yMaxSize
0, 0,; // xMaxPosition, yMaxPosition
nMINWidth, nMINHeight,; // xMinTrackSize, yMinTrackSize
nMAXWidth, nMAXHeight }
oDlg:bResized := { || ;
oRect := oDlg:GetCliRect(), ;
oBtnClose:nTop := oRect:nBottom - 50, ;
oBtnClose:nLeft := oRect:nRight - 100, ;
oBtnOK:nTop := oRect:nBottom - 50, ;
oBtnOK:nLeft := oRect:nRight - 200, ;
oBtnHelp:nLeft := oRect:nRight - 100, ;
oPanel:nWidth := oRect:nWidth - 10, ;
oPanel:CheckResize(), oPanel:setRange()}
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT PANELBUTTON(oPanel)
RETURN NIL
//-------------------------------------------------------------//
FUNCTION PANELBUTTON(oPanel)
Local oBtn
@ 1,2 BTNBMP oBtn ;
SIZE 190, 50 PIXEL;
FLAT ;
PROMPT "test" LEFT;
OF oPanel ;
TOOLTIP "fai click per aggiungere un servizio" ;
COLOR CLR_RED,Rgb( 225,239,219) ;
GRADIENT { | lInvert | If( ! lInvert,;
{ { 1 ,RGB( 225, 225,225 ), RGB( 229,241,251 ) } },;
{ { 1, RGB( 229,241,251 ),RGB( 225, 225, 225 ) } } ) }
oPanel:CheckResize()
oPanel:setRange()
RETURN NIL
the problem come when I insert these commands
local nMINWidth := 628
local nMINHeight := 570
local nMAXWidth := GETSYSMETRICS( 0 ) //risoluzione orizzontale
local nMAXHeight := GETSYSMETRICS( 1 ) //risoluzione verticale
oDlg:aMinMaxInfo = { GETSYSMETRICS( 0 ), GETSYSMETRICS( 1 ),; // xMaxSize, yMaxSize
0, 0,; // xMaxPosition, yMaxPosition
nMINWidth, nMINHeight,; // xMinTrackSize, yMinTrackSize
nMAXWidth, nMAXHeight }
because I wish set max/min coordinates of dialog
this is the error
- Code: Select all Expand view RUN
- Application
===========
Path and name: C:\Work\Errori\error_panelscrol\test.Exe (32 bits)
Size: 3,592,192 bytes
Compiler version: Harbour 3.2.0dev (r1703231115)
FiveWin version: FWH 17.12
C compiler version: Borland/Embarcadero C++ 7.0 (32-bit)
Windows version: 6.1, Build 7600
Time from start: 0 hours 0 mins 6 secs
Error occurred at: 07/03/18, 18:10:57
Error description: Error BASE/1004 No exported method: NTOP
Args:
[ 1] = U
Stack Calls
===========
Called from: => NTOP( 0 )
Called from: .\source\classes\SCRLPANL.PRG => TSCROLLPANEL:VSETPOS( 216 )
Called from: .\source\classes\SCRLPANL.PRG => TSCROLLPANEL:RESIZE( 140 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\CONTROL.PRG => TSCROLLPANEL:HANDLEEVENT( 1731 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3356 )
Called from: => WNDWIDTH( 0 )
Called from: .\source\classes\CONTROL.PRG => (b)TCONTROL( 179 )
Called from: .\source\classes\CONTROL.PRG => TSCROLLPANEL:_NWIDTH( 0 )
Called from: test.prg => (b)TEST( 52 )
Called from: .\source\classes\WINDOW.PRG => TWINDOW:RESIZE( 2227 )
Called from: .\source\classes\DIALOG.PRG => (b)TDIALOG( 97 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:RESIZE( 0 )
Called from: => TWINDOW:HANDLEEVENT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:HANDLEEVENT( 922 )
Called from: => DIALOGBOXINDIRECT( 0 )
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE( 296 )
Called from: test.prg => TEST( 54 )
Any solution please ?