New BtnBmp Vs Old Btnbmp

New BtnBmp Vs Old Btnbmp

Postby Silvio.Falconi » Sat Apr 16, 2022 10:03 am

compiling an old program I realized that the btnbmp does not work as it was before on Win 10
when I want to see a popup menu when I press the button on the last btnbmp I have

Image

the command is
Code: Select all  Expand view

@xRow,xCol BTNBMP  oOpe[4] Prompt "FI" size xWidth,xHeight PIXEL FLAT;
   OF oDlg  TOOLTIP "Figure" ACTION  MenuFigure(oBtnNum,oSay,oOpe,4)
 


or

Code: Select all  Expand view
@xRow,xCol BTNBMP  oOpe[4] Prompt "FI" size xWidth,xHeight PIXEL FLAT;
   OF oDlg  TOOLTIP "Figure" ACTION  ::ShowPopUp( { |oBtn| MenuFigure(oBtn,oSay,oOpe,4) } )
 


the result is the same , I mean to show the arrow or not when I wish to show a popup menu

Image

in aesthetics it is bad to have that arrow and the text that moves, this could be fine in the tbar but not in a context like mine
in addition to the black arrow the white line cuts the button and this is not really nice to see

in the old (I could not determine which version - I dont remember )

Image


then I found a difference compiling the same test sample with a oldest btnbmp class ( allways on Win 10 )

Image

on my test I use the same lines

Code: Select all  Expand view

  AEVAL(  oOpe, {| oBtn |oBtn:nWidth:= xWidth+7 } )
  AEVAL(  oOpe, {| oBtn |oBtn:SetColor( CLR_BLACK, rgb(211,211,211) )} )
  AEVAL(  oOpe, {| oBtn |oBtn:nLayOut:= 0 } )
  AEVAL(  oOpe, {| oBtn |oBtn:oCursor:= oHand } )
  AEVAL(  oOpe, {| oBtn |oBtn:lRound:= .F. } )

     oOpe[10]:SetColor( CLR_BLACK, rgb(145,255,172) )
     oOpe[11]:SetColor( CLR_BLACK, rgb(255,168,168) )
     oOpe[12]:SetColor( CLR_BLACK, rgb(165,165,165) )
 


Note btnbmp with "GE" is Different with btnbmp "CA" but is the same code ..that is, it is slightly narrower.....strange!!!

ok :) now Use the last release I have (July 2021 to November 2021)

Image

I add only a line on METHOD PaintPopupSection()

Code: Select all  Expand view
if ::oPopup != nil  .and.  GetClassName( GetParent( Self:hWnd ) ) = "TBAR"


I don't understand why this command was canceled (.and. GetClassName( GetParent( Self:hWnd ) ) = "TBAR" )
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: New BtnBmp Vs Old Btnbmp

Postby nageswaragunupudi » Sat Apr 16, 2022 5:54 pm

We did not make any changes to btnbmp class after 2006
Regards

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

Re: New BtnBmp Vs Old Btnbmp

Postby Silvio.Falconi » Sun Apr 17, 2022 8:11 pm

nageswaragunupudi wrote:We did not make any changes to btnbmp class after 2006


strange...ok!!
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: Google [Bot] and 85 guests