xbrowse Border

xbrowse Border

Postby Silvio.Falconi » Fri Nov 10, 2023 2:33 pm

Image

how can I have the black border at the right side of the xbrowse after the scrollbar ?

I made

Code: Select all  Expand view
@ 40, 10 XBROWSE oBrw OF oDlg SIZE 300, -20 PIXEL ;
      AUTOCOLS DATASOURCE oDbf NOBORDER

                   WITH OBJECT oBrw
                             :lDrawBorder := .t.
                             :nClrBorder := CLR_BLACK
                     END


but the border is drawed only on left and up and down of the xbrowse

If I make
oBrw:lVScroll := .f.
oBrw:lhScroll := .f.

the border is painted good but I need to use Vscroll

Image


I think we need to tell the xbrowse class that when there is vertical scrolling the border must be drawn after the scroll

any solution ?
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: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowse Border

Postby Silvio.Falconi » Mon Nov 13, 2023 8:17 am

For Antonio & NagesWarao Lines 2674/2675 of Xbrowse class

I propose this solution for displaying the border in the presence of vertical scrolling

if ::lDrawBorder
// ::Box( 0, 0, ::nHeight - 1, ::nWidth - 1, IfNil( ::nClrBorder, ::hColPen ) )
::Box( 0, 0, ::nHeight - 1, ::BrwWidth(), IfNil( ::nClrBorder, ::hColPen ) )
endif


Image

the same must be made in the presence of Horizontal scrolling but I not found the part where draw the box when there ::lHscroll is true

better can be

oBrw:lVScroll := .t.
oBrw:lhScroll := .t.

Code: Select all  Expand view


 if ::lDrawBorder
     If ::lVScroll
         ::Box( 0, 0, ::nHeight - 1, ::BrwWidth(), IfNil( ::nClrBorder, ::hColPen ) )
      Endif
     If ::lHScroll
         ::Box( 0, 0, ::BrwHeight(), ::nWidth - 1, IfNil( ::nClrBorder, ::hColPen ) )
      endif
     If ::lVScroll  .and. ::lHScroll
         ::Box( 0, 0, ::BrwHeight(), ::BrwWidth(), IfNil( ::nClrBorder, ::hColPen ) )
     endif
  endif

 


Image

it run also with oBrw:lfooter := .t.

My Advice
the best modification is to draw the border after the horizontal and vertical scroll and not before as I have solved, certainly you would know how to do it
i.e. the border should be drawn around the whole control as it was a long time ago (xbrowse Ortiz de Zuniga)
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: 7061
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 77 guests