btnbmp bug?? - RESOLVED -

btnbmp bug?? - RESOLVED -

Postby Silvio.Falconi » Fri May 12, 2023 9:00 am

at the beginning when i load the test i see in the dialog the btnbmp with a black border (which shouldn't be there)
then if I move the dialog to another position I see the border with the right color and this also when I press the btnbmpo to scroll the popup menu
I don't understand why that black edge is formed and I don't know how to remove it

Image


Code: Select all  Expand view

#include "fivewin.ch"

// test btnbmp

Function test()
local oDlg,oBtn
local oFont,oBold
local oCursorBtn :=TCursor():New(,'HAND')

  local nWd  := GetSysMetrics(0) * .58
  local nHt  := (GetSysMetrics(1) / 2 ) -20

 oFont := TFont():New( "Tahoma", 0, 14,, )
       oBold := TFont():New( "Tahoma", 0, 14,,.t. )

DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL;
       FONT oFont   COLOR CLR_BLACK, RGB( 245,245,235)  ;
       STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
                  WS_MINIMIZEBOX)

 @ 10,550 BTNBMP  oBtn ;
           NAME "COMBOBMP"       ;
           SIZE 100, 25 PIXEL    ;
           PROMPT "testobutton"      ;
           FONT oFont  FLAT  RIGHT ;
           COLOR  CLR_BLACK ,RGB( 245,245,235);
           ACTION ::ShowPopUp( { |oBtn,nRow,nCol| oBtnMenu(oBtn)     } )


           oBtn:bClrGrad = { | lInvert | If( ! lInvert,;
                    { { 0.25, RGB( 245,245,235), RGB(250,250,245) },;
                      { 0.75, RGB(250,250,245), RGB( 245,245,235) } },;
                    { { 0.25, RGB(250,250,245), RGB( 245,245,235) }, ;
                      { 0.75, RGB( 245,245,235), RGB(250,250,245) } } ) }
               oBtn:nClrBorder := IIF(oBtn:lMOver,RGB( 219, 230, 244),RGB( 219, 230, 244))
               oBtn:oCursor:=   oCursorBtn





               ACTIVATE DIALOG oDlg

RETURN NIL
//--------------------------------------------//
Function oBtnMenu(oBtn)
 MENU oMenu POPUP
    MenuItem "XXXXXXXXXXXXXXXXX"
    MenuItem "XXXXXXXXXXXXXXXXX"
    MenuItem "XXXXXXXXXXXXXXXXX"
ENDMENU
return oMen
Last edited by Silvio.Falconi on Sat May 13, 2023 9:33 am, 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: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: btnbmp bug??

Postby karinha » Fri May 12, 2023 3:29 pm

I liked. It gives a special effect. Although I prefer to use BUTTONBMP.

Code: Select all  Expand view

#Include "fivewin.ch"

FUNCTION test()

   LOCAL oDlg, oBtn
   LOCAL oFont, oBold
   LOCAL oCursorBtn := TCursor():New(, 'HAND' )

   LOCAL nWd  := GetSysMetrics( 0 ) * .58
   LOCAL nHt  := ( GetSysMetrics( 1 ) / 2 ) - 20

   SkinButtons()

   oFont := TFont():New( "Tahoma", 0, 14,, )
   oBold := TFont():New( "Tahoma", 0, 14,, .T. )

   DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL FONT oFont               ;
      COLOR CLR_BLACK, RGB( 245, 245, 235 )                                  ;
      STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, WS_MINIMIZEBOX)

   //10  550
   @ 10, 450 BTNBMP oBtn NAME "COMBOBMP" SIZE 100, 25 PIXEL ;
      PROMPT "TestBtnBmp" FONT oFont RIGHT FLAT 2007        ;
      ACTION( ::ShowPopUp( {| oBtn, nRow, nCol | oBtnMenu( oBtn ) } ) )

   oBtn:bClrGrad = {| lInvert | If( ! lInvert, ;
      { { 0.25, RGB( 245, 245, 235 ), RGB( 250, 250, 245 ) }, ;
      { 0.75, RGB( 250, 250, 245 ), RGB( 245, 245, 235 ) } }, ;
      { { 0.25, RGB( 250, 250, 245 ), RGB( 245, 245, 235 ) }, ;
      { 0.75, RGB( 245, 245, 235 ), RGB( 250, 250, 245 ) } } ) }

   oBtn:nClrBorder := iif( oBtn:lMOver, RGB( 219, 230, 244 ), RGB( 219, 230, 244 ) )
   oBtn:oCursor :=   oCursorBtn

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL

FUNCTION oBtnMenu( oBtn )  // ERROR

   LOCAL oMenu

   MENU oMenu POPUP 2007

      MenuItem "XXXXXXXXXXXXXXXXX"

      MenuItem "XXXXXXXXXXXXXXXXX"

      MenuItem "XXXXXXXXXXXXXXXXX"

   ENDMENU

Return( oMenu )

// FIN / END
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7826
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: btnbmp bug??

Postby mauri.menabue » Sat May 13, 2023 2:01 am

hi Silvio

that black mark because the button has fire, try the test with the changes you will see

Code: Select all  Expand view


#include "fivewin.ch"

// test btnbmp

Function test()
local oDlg,oBtn
local oFont,oBold
local pippo := "mmm"   // *****************************
local oGet             // *****************************
local oCursorBtn :=TCursor():New(,'HAND')

  local nWd  := GetSysMetrics(0) * .58
  local nHt  := (GetSysMetrics(1) / 2 ) -20

 oFont := TFont():New( "Tahoma", 0, 14,, )
       oBold := TFont():New( "Tahoma", 0, 14,,.t. )

DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL;
       FONT oFont   COLOR CLR_BLACK, RGB( 245,245,235)  ;
       STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
                  WS_MINIMIZEBOX)

 @ 10,550 BTNBMP  oBtn ;
           NAME "COMBOBMP"       ;
           SIZE 100, 25 PIXEL    ;
           PROMPT "testobutton"      ;
           FONT oFont  FLAT  RIGHT ;
           COLOR  CLR_BLACK ,RGB( 245,245,235);
           ACTION ::ShowPopUp( { |oBtn,nRow,nCol| oBtnMenu(oBtn)     } )


           oBtn:bClrGrad = { | lInvert | If( ! lInvert,;
                    { { 0.25, RGB( 245,245,235), RGB(250,250,245) },;
                      { 0.75, RGB(250,250,245), RGB( 245,245,235) } },;
                    { { 0.25, RGB(250,250,245), RGB( 245,245,235) }, ;
                      { 0.75, RGB( 245,245,235), RGB(250,250,245) } } ) }
               oBtn:nClrBorder := IIF(oBtn:lMOver,RGB( 219, 230, 244),RGB( 219, 230, 244))
               oBtn:oCursor:=   oCursorBtn


     @ 5, 50 GET oget var pippo of odlg   // ******************************

       

               ACTIVATE DIALOG oDlg ON init oGet:setfocus()  // ***************************

RETURN NIL
//--------------------------------------------//
Function oBtnMenu(oBtn)
 MENU oMenu POPUP
    MenuItem "XXXXXXXXXXXXXXXXX"
    MenuItem "XXXXXXXXXXXXXXXXX"
    MenuItem "XXXXXXXXXXXXXXXXX"
ENDMENU
return oMenu
 


TIA
User avatar
mauri.menabue
 
Posts: 155
Joined: Thu Apr 17, 2008 2:38 pm

Re: btnbmp bug??

Postby Silvio.Falconi » Sat May 13, 2023 9:34 am

mauri.menabue wrote:hi Silvio

that black mark because the button has fire, try the test with the changes you will see

Code: Select all  Expand view


#include "fivewin.ch"

// test btnbmp

Function test()
local oDlg,oBtn
local oFont,oBold
local pippo := "mmm"   // *****************************
local oGet             // *****************************
local oCursorBtn :=TCursor():New(,'HAND')

  local nWd  := GetSysMetrics(0) * .58
  local nHt  := (GetSysMetrics(1) / 2 ) -20

 oFont := TFont():New( "Tahoma", 0, 14,, )
       oBold := TFont():New( "Tahoma", 0, 14,,.t. )

DEFINE DIALOG oDlg SIZE nWd, nHt PIXEL TRUEPIXEL;
       FONT oFont   COLOR CLR_BLACK, RGB( 245,245,235)  ;
       STYLE nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, WS_SYSMENU, ;
                  WS_MINIMIZEBOX)

 @ 10,550 BTNBMP  oBtn ;
           NAME "COMBOBMP"       ;
           SIZE 100, 25 PIXEL    ;
           PROMPT "testobutton"      ;
           FONT oFont  FLAT  RIGHT ;
           COLOR  CLR_BLACK ,RGB( 245,245,235);
           ACTION ::ShowPopUp( { |oBtn,nRow,nCol| oBtnMenu(oBtn)     } )


           oBtn:bClrGrad = { | lInvert | If( ! lInvert,;
                    { { 0.25, RGB( 245,245,235), RGB(250,250,245) },;
                      { 0.75, RGB(250,250,245), RGB( 245,245,235) } },;
                    { { 0.25, RGB(250,250,245), RGB( 245,245,235) }, ;
                      { 0.75, RGB( 245,245,235), RGB(250,250,245) } } ) }
               oBtn:nClrBorder := IIF(oBtn:lMOver,RGB( 219, 230, 244),RGB( 219, 230, 244))
               oBtn:oCursor:=   oCursorBtn


     @ 5, 50 GET oget var pippo of odlg   // ******************************

       

               ACTIVATE DIALOG oDlg ON init oGet:setfocus()  // ***************************

RETURN NIL
//--------------------------------------------//
Function oBtnMenu(oBtn)
 MENU oMenu POPUP
    MenuItem "XXXXXXXXXXXXXXXXX"
    MenuItem "XXXXXXXXXXXXXXXXX"
    MenuItem "XXXXXXXXXXXXXXXXX"
ENDMENU
return oMenu
 


TIA


THANK YOU BUT I GOT THERE MYSELF
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: btnbmp bug?? - RESOLVED -

Postby karinha » Sat May 13, 2023 4:22 pm

Good afternoon Silvio. Post how you solved it, other users may have the same problem as you. With the solution, it gets easier.

Buenas tardes Silvio. Publica cómo lo resolviste, otros usuarios pueden tener el mismo problema que tú. Con la solución, se vuelve más fácil.

Gracias, tranks.

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7826
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: btnbmp bug?? - RESOLVED -

Postby Silvio.Falconi » Sun May 14, 2023 10:10 am

Menabue 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: btnbmp bug?? - RESOLVED -

Postby Armando » Tue May 16, 2023 7:27 pm

Hello Friends:

Why Silvio never share his solutions?

Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3228
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: btnbmp bug?? - RESOLVED -

Postby Silvio.Falconi » Wed May 17, 2023 6:57 am

Armando wrote:Hello Friends:

Why Silvio never share his solutions?

Regards



if you read everything you would understand that the solution is already published, I don't have to publish other solutions, as I have already written the solution has been found by MeNabue
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 103 guests