METHOD MouseLeave( nRow, nCol, nFlags ) CLASS TBtnBmp
::lMOver = .F.
XEval( ::bMMoved, ::lMOver )
::Setcolor( CLR_BLACK ) //Ésta
::Refresh()
return nil
If lPuede //Botón activo
REDEFINE BTNBMP oBtn ID xI+100 OF oDlgMnu RESOURCE "Boton1",Nil,Nil,"Boton2" PROMPT oMenu:Item ACTION (&aAct,oDlgMnu:SetFocus()) FONT oFontMenu TRANSPARENT ADJUST 2007
oBtn:bMMoved:= {|| lColor:=.t.,cMsg:=vMsg,BusFoto(vTab,xI), oMsg:Refresh(),oBtn:Setcolor( CLR_HBLUE )}
Else ////Botón Desactivado
REDEFINE BTNBMP oBtn ID xI+100 OF oDlgMnu RESOURCE "Boton1",Nil,Nil,"Boton1" PROMPT oMenu:Item FONT oFontMenu TRANSPARENT ADJUST 2007
oBtn:SetColor( CLR_GRAY )
oBtn:bMMoved:= {|| lColor:=.F.,cMsg:=vMsg,BusFoto(vTab,xI), oMsg:Refresh(),oBtn:Setcolor( CLR_GRAY )}
ENDif
METHOD MouseLeave( nRow, nCol, nFlags ) CLASS TBtnBmp
::lMOver = .F.
XEval( ::bMMoved, ::lMOver )
If lColor //Para controlar cuando el botón está desactivado y no se ponga CLR_BLACK
::Setcolor( CLR_BLACK )
Endif
::Refresh()
return nil
REDEFINE BTNBMP oBtn ID xI+100 OF oDlgMnu RESOURCE "Boton1",Nil,Nil,"Boton2" ;
PROMPT oMenu:Item ACTION (&aAct,oDlgMnu:SetFocus())
COLOR { |lMOver| If( lMover, CLR_BLUE, CLR_BLACK ) }, CLR_WHITE ;
FONT oFontMenu TRANSPARENT ADJUST 2007
if !lPuede
oBtn:Disable()
endif
#include "fivewin.ch"
function Main()
local oDlg, oFont, oBtn1, oBtn2
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14 BOLD
DEFINE DIALOG oDlg SIZE 400,300 PIXEL TRUEPIXEL FONT oFont
@ 020,20 BTNBMP oBtn1 SIZE 200,70 PIXEL OF oDlg ;
FILE "\fwh\bitmaps\32x32\cascade.bmp", nil, nil, ;
"\fwh\bitmaps\32x32\tiled.bmp" ;
PROMPT "Prompt" 2007 ;
COLOR { |lMOver| If( lMover, CLR_HRED, CLR_BLACK ) }, CLR_WHITE ;
ACTION MsgInfo( "Some Action" ) ;
MESSAGE "MouseOver"
@ 120,20 BTNBMP oBtn2 SIZE 200,70 PIXEL OF oDlg ;
FILE "\fwh\bitmaps\32x32\cascade.bmp", nil, nil, ;
"\fwh\bitmaps\32x32\tiled.bmp" ;
PROMPT "Prompt" 2007 ;
COLOR { |lMOver| If( lMover, CLR_HRED, CLR_BLACK ) }, CLR_WHITE ;
ACTION MsgInfo( "Some Action" ) ;
MESSAGE "MouseOver"
oBtn2:Disable()
oDlg:bInit := <||
DEFINE MSGBAR OF oDlg PROMPT "" 2007
return nil
>
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
REDEFINE BTNBMP oBtn ID xI+100 OF oDlgMnu RESOURCE "Boton1",Nil,Nil,"Boton2" ;
PROMPT oMenu:Item ACTION (&aAct,oDlgMnu:SetFocus()) ;
COLOR { |lMOver| If( lMover, CLR_BLUE, CLR_BLACK ) }, CLR_WHITE ;
FONT oFontMenu TRANSPARENT ADJUST 2007
REDEFINE BTNBMP oBtn ID xI+100 OF oDlgMnu RESOURCE "Boton1",Nil,Nil,"Boton2" ;
PROMPT oMenu:Item ACTION (&aAct,oDlgMnu:SetFocus())
FONT oFontMenu TRANSPARENT ADJUST 2007
oBtn:nClrText := { |lMOver| If( lMover, CLR_BLUE, CLR_BLACK ) }
if !lPuede
oBtn:Disable()
endif
- When a column header is clicked, the header is painted in the topbar area
fixed.
viewtopic.php?f=3&t=39178&p=233785#p233785
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 52 guests