Xbrowse button size

Xbrowse button size

Postby Silvio.Falconi » Tue Nov 12, 2019 12:30 pm

Image

I use FW_BmpPlus(), FW_BmpMinus()

Can we correct this problem ?

the size of plus button see to smaller than minus button

I tried with other file (png)
Image

As you can see the border ( on yellow) is too big of plus button

thanks
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: 6849
Joined: Thu Oct 18, 2012 7:17 pm

Re: Xbrowse button size

Postby nageswaragunupudi » Thu Nov 14, 2019 8:28 am

Can you try making this change in XBrowse.prg?

Please locate the method
METHOD PaintCellBtn( hDC, oRect, aColors ) CLASS TXBrwColumn

The method looks like this:
Code: Select all  Expand view
METHOD PaintCellBtn( hDC, oRect, aColors ) CLASS TXBrwColumn

   local oBtn, oBrush

   if !::lBtnTransparent
      WndBoxRaised(hDC, oRect:nTop - 1, oRect:nLeft - 1,;
                        oRect:nBottom, oRect:nRight + 1 ) // ButtonGet
   endif

   if ::nEditType == EDIT_LISTBOX .or. ::nEditType == EDIT_GET_LISTBOX
      ::oBtnElip:Hide()
      oBtn     := ::oBtnList
   else
      ::oBtnList:Hide()
      oBtn     := ::oBtnElip
   endif
   oBtn:Move( oRect:nTop, oRect:nLeft, oRect:nWidth, oRect:nHeight, .f.) // ButtonGet
   oBtn:Show()

   oBtn:GetDC()
   if .not. ::lBtnTransparent
      oRect:nRight   += 1
      FillRect( hDC, oRect:aRect, oBtn:oBrush:hBrush )
   else
      FillRectEx( hDC, oRect:aRect, aColors[ 2 ] )
   endif
   oBtn:lTransparent := ::lBtnTransparent
   if ! Empty( oBtn:hBitmap1 )
      oBtn:PaintBitmap()
   elseif ! Empty( oBtn:cCaption )
      oBtn:PaintCaption()
   endif
   oBtn:ReleaseDC()


/*
   if ::lBtnTransparent
      oBtn:lTransparent := .f.
      oBtn:bClrGrad     := { || { { 1, aColors[ 2 ], aColors[ 2 ] } } }
   endif
   oBtn:Refresh()
*/


return nil
 


Please change it like this:
Code: Select all  Expand view
METHOD PaintCellBtn( hDC, oRect, aColors ) CLASS TXBrwColumn

   local oBtn, oBrush

   if !::lBtnTransparent
      WndBoxRaised(hDC, oRect:nTop - 1, oRect:nLeft - 1,;
                        oRect:nBottom, oRect:nRight + 1 ) // ButtonGet
   endif

   if ::nEditType == EDIT_LISTBOX .or. ::nEditType == EDIT_GET_LISTBOX
      ::oBtnElip:Hide()
      oBtn     := ::oBtnList
   else
      ::oBtnList:Hide()
      oBtn     := ::oBtnElip
   endif
   oBtn:Move( oRect:nTop, oRect:nLeft, oRect:nWidth, oRect:nHeight, .f.) // ButtonGet
   oBtn:Show()
/*
   oBtn:GetDC()
   if .not. ::lBtnTransparent
      oRect:nRight   += 1
      FillRect( hDC, oRect:aRect, oBtn:oBrush:hBrush )
   else
      FillRectEx( hDC, oRect:aRect, aColors[ 2 ] )
   endif
   oBtn:lTransparent := ::lBtnTransparent
   if ! Empty( oBtn:hBitmap1 )
      oBtn:PaintBitmap()
   elseif ! Empty( oBtn:cCaption )
      oBtn:PaintCaption()
   endif
   oBtn:ReleaseDC()
*/


   if ::lBtnTransparent
      oBtn:lTransparent := .f.
      oBtn:bClrGrad     := { || { { 1, aColors[ 2 ], aColors[ 2 ] } } }
   endif
   oBtn:Refresh()

return nil
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10308
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Xbrowse button size

Postby Silvio.Falconi » Thu Nov 14, 2019 9:28 am

Now Seem ok thanks

the green button not is the same of red because the border is different, on red button not have that box, I see the box when I put the mouse over
Last edited by Silvio.Falconi on Mon Feb 10, 2020 2:01 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: 6849
Joined: Thu Oct 18, 2012 7:17 pm

Re: Xbrowse button size

Postby Silvio.Falconi » Thu Nov 28, 2019 10:20 am

Nages,
can we insert oCursor Hand when the user press these buttons?
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: 6849
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 35 guests