oPanel with Vscroll and Hscroll RESOLVED!!

oPanel with Vscroll and Hscroll RESOLVED!!

Postby Silvio.Falconi » Mon Aug 20, 2018 5:02 pm

I need to insert on a dialog a Panel with Vscroll and Hscroll to insert some bitmpas into

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

#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 ?
Last edited by Silvio.Falconi on Tue Aug 21, 2018 12:47 pm, edited 1 time in total.
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: 7057
Joined: Thu Oct 18, 2012 7:17 pm

Re: oPanel with Vscroll and Hscroll

Postby Silvio.Falconi » Tue Aug 21, 2018 12:46 pm

resolved !
I used tscrollpanel and tscrdlg together
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: 7057
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 112 guests