#ifdef RECINFORMATICA
// add: lHBar, lVBar - barre di scorrimento
METHOD New( nTop, nLeft, nWidth, nHeight, oWnd, aBitmaps, lPixel,;
lDesign, aPrompts, nFolderHeight, ;
aHelps, nRound, bAction, bClrTabs, bClrText, aAlign, ;
lAdjust, nSeparator, nOption, bPopUp, lStretch, ;
cLayOut, bBmpAction, nBright, lAnimate, nSpeed, oFont, ;
lTransparent, aDialogs, lBorder, nClrPane, cVarName, lHBar, lVBar ) CLASS TFolderEx //-->> byte-one 2010
#else
METHOD New( nTop, nLeft, nWidth, nHeight, oWnd, aBitmaps, lPixel,;
lDesign, aPrompts, nFolderHeight, ;
aHelps, nRound, bAction, bClrTabs, bClrText, aAlign, ;
lAdjust, nSeparator, nOption, bPopUp, lStretch, ;
cLayOut, bBmpAction, nBright, lAnimate, nSpeed, oFont, ;
lTransparent, aDialogs, lBorder, nClrPane, cVarName ) CLASS TFolderEx //-->> byte-one 2010
#endif
...
...
for n = 1 to nLen
#ifdef RECINFORMATICA // 30/08/2024
default lHBar := .f.
default lVBar := .f.
DEFINE DIALOG oDlg OF Self STYLE nOR( WS_CHILD, If( ! ::oWnd:IsKindOf( "TDIALOG"), WS_CLIPCHILDREN, 0 ),;
if(lHBar, WS_HSCROLL, 0), if(lVBar, WS_VSCROLL, 0));
FROM 0, 1 TO ::nHeight(), ::nWidth() PIXEL ;
FONT ::ownd:oFont ;
HELPID If( Len( ::aHelps ) >= n , ::aHelps[ n ] , NIL )
// following lines have no effect!!
if lVBar
DEFINE SCROLLBAR oDlg:oVScroll VERTICAL OF oDlg
oDlg:oVScroll:SetRange( 1, ::nHeight() )
endif
if lHBar
DEFINE SCROLLBAR oDlg:oHScroll HORIZONTAL OF oDlg
oDlg:oHScroll:SetRange( 1, ::nWidth() )
endif
#else
DEFINE DIALOG oDlg OF Self STYLE nOR( WS_CHILD, If( ! ::oWnd:IsKindOf( "TDIALOG"), WS_CLIPCHILDREN, 0 ) );
FROM 0, 1 TO ::nHeight(), ::nWidth() PIXEL ;
FONT ::ownd:oFont ;
HELPID If( Len( ::aHelps ) >= n , ::aHelps[ n ] , NIL )
#endif
oDlg:SetBrush( ::oBrush )
::aDialogs[ n ] = oDlg
oDlg:cVarName := "Page" + AllTrim( Str( n ) )
oDlg:Hide()
// oDlg:lTransparent := .T.
next
chiaiese wrote:Hi,
Is it possibile to enable scrollbars on tFolderex control?
the situation: I have an MdiChild container with a Browse on the left and a FolderEx control on the right, the two controls are divided by a Splitter, see some samples in the picture below.
So the tFolderex control is resizeable in every direction (as the browse) and I would like to put scrollbars on it to see the content without enlarge the whole window.
I have changed the style of every dialog in the tFolderex control to paint the bars but they doesn't work (do nothing when i scroll them).
How can I solve the problem?
Roberto
Method SetClip()
::oClip:lFolder := .t.
::oClip:addFld( CEditFld():New( "ImageName" ,"File:",, .f. )) // thi is a simple tSay object
::oClip:Getfld("ImageName"):bData := {|| (::nArea)->(basename(trim(PathFile)+PATHTHUMB+"s"+trim(NomeFile))+THUMBEXT) }
::oClip:addFld( CEditFld():New( "Image" ,"Img.:",, .f. ))
::oClip:Getfld("Image"):bData := {|| (::nArea)->(basename(trim(PathFile)+PATHTHUMB+"s"+trim(NomeFile))+THUMBEXT) }
::oClip:Getfld("Image"):nType := OCTRL_IMAGE // here I define that I want to display the image
::oClip:bOnDisp := {|oCl,lSet| ::OnDisp(oCl,lSet) } // everytime the control is updated
return (Self)
******************************************************************************
Method OnDisp(oClip,lSet)
if lSet
oClip:getFld("Image"):oCtrl:blDblClick := {||::display() } // open the document
oClip:getFld("Image"):oCtrl:oCursor := TCursor():New(,"Hand")
endif
return (nil)
karinha wrote:Why don't you use a TBITMAP? Much simpler to control.
¿Por qué no utilizas un TBITMAP? Mucho más sencillo de controlar.
https://imgur.com/dQPaazc
Regards, saludos.
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 48 guests