codeblock (for color border) on btnbmp

Post Reply
User avatar
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

codeblock (for color border) on btnbmp

Post by Silvio.Falconi »

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

#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
Enrico Maria Giordano
Posts: 8753
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 4 times
Contact:

Re: codeblock (for color border) on btnbmp

Post by Enrico Maria Giordano »

Code: Select all | Expand

#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
Silvio.Falconi
Posts: 7136
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 1 time

Re: codeblock (for color border) on btnbmp

Post by Silvio.Falconi »

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
Post Reply