codeblock (for color border) on btnbmp

codeblock (for color border) on btnbmp

Postby Silvio.Falconi » Mon Jan 21, 2019 10:49 am

to show a color border on btnbmp when I move over with the mouse I made

aBmps[nY,nX]:nClrBorder := { || (IIF(aBmps[nY,nX]:lMOver,CLR_WHITE,CLR_GRAY)) }


But I not see any border colored and the border is allways black

Image



test sample

Code: Select all  Expand view
#include"fivewin.ch"


#define BMP_H    20
#define BMP_V    20

Function test()
Local oDlg
Local aBmps
Local TOTX        := 10
Local TOTY        := 10
Local nx,xy

Local nRow:=10
Local nCol:=BMP_V
Local oFontNumber


      aBmps:=array( TOTX,TOTY )

DEFINE FONT oFontNumber NAME "VERDANA" SIZE 0,-14 BOLD

DEFINE DIALOG oDlg SIZE 800,600

 For nY := 1 to TOTY
    For nX := 1 To TOTX

  @ nrow, ncol  BTNBMP aBmps[ nY, nX ] RESOURCE "PNG_VUOTOC" OF oDlg ;
                SIZE  BMP_H, BMP_V PIXEL FLAT  TRANSPARENT FONT oFontNumber


              aBmps[nY,nX]:nClrBorder := { || (IIF(aBmps[nY,nX]:lMOver,CLR_WHITE,CLR_GRAY)) }
         
        ncol:=ncol+BMP_V

       Next nX
    nRow += BMP_H
   nCol := BMP_V
Next nY

ACTIVATE DIALOG oDLG CENTER
RETURN NIL



I tried to post the problem also on this topic :
viewtopic.php?f=3&t=36514&start=0&hilit=btnbmp+color+border

you can the first gif as it was before
https://i.postimg.cc/Kv8VX6fL/spiaggia-vecchia.gif


now i see this

https://i.postimg.cc/GmsXddyB/spiaggia-nuova.gif
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: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: codeblock (for color border) on btnbmp

Postby Enrico Maria Giordano » Mon Jan 21, 2019 12:18 pm

Code: Select all  Expand view
#include"fivewin.ch"


#define BMP_H    20
#define BMP_V    20

Function test()
Local oDlg
Local aBmps
Local TOTX        := 10
Local TOTY        := 10
Local nx,ny

Local nRow:=10
Local nCol:=BMP_V
Local oFontNumber


      aBmps:=array( TOTX,TOTY )

DEFINE FONT oFontNumber NAME "VERDANA" SIZE 0,-14 BOLD

DEFINE DIALOG oDlg SIZE 800,600

 For nY := 1 to TOTY
    For nX := 1 To TOTX
        MAKEBUTTON( oDlg, nRow, nCol, aBmps, nX, nY, oFontNumber )
        ncol:=ncol+BMP_V
    Next nX
    nRow += BMP_H
    nCol := BMP_V
Next nY

ACTIVATE DIALOG oDLG CENTER
RETURN NIL


STATIC FUNCTION MAKEBUTTON( oDlg, nRow, nCol, aBmps, nX, nY, oFontNumber )

  @ nrow, ncol  BTNBMP aBmps[ nY, nX ] RESOURCE "PNG_VUOTOC" OF oDlg ;
                SIZE  BMP_H, BMP_V PIXEL FLAT  TRANSPARENT FONT oFontNumber


              aBmps[nY,nX]:nClrBorder := { || (IIF(aBmps[nY,nX]:lMOver,CLR_WHITE,CLR_GRAY)) }
         
RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8712
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: codeblock (for color border) on btnbmp

Postby Silvio.Falconi » Mon Jan 21, 2019 12:22 pm

why I must create a new function if before ( 12.17) run ok ?
cmq now run 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: 7056
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 63 guests