Nuevo FWH 21.01

User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Nuevo FWH 21.01

Post by Antonio Linares »

Last edited by Antonio Linares on Wed Nov 26, 2008 6:47 pm, edited 1 time in total.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Nuevo FWH 19.09

Post by Antonio Linares »

.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
acuellar
Posts: 1312
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Nuevo FWH 18.01

Post by acuellar »

Estimado Antonio

Puede agregar ésta línea en la Clase Btnbmp

Code: Select all

METHOD MouseLeave( nRow, nCol, nFlags ) CLASS TBtnBmp
    
   ::lMOver = .F.
   XEval( ::bMMoved, ::lMOver )
   ::Setcolor( CLR_BLACK )  //Ésta
   ::Refresh()

return nil
 
Gracias
Saludos,

Adhemar C.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Nuevo FWH 18.01

Post by Antonio Linares »

Adhemar,

Se cambia el color del texto del botón en caso de no hacerlo ?

Por qué cambia el color ?

Debería seguir usándose el valor contenido en ::nClrText
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
acuellar
Posts: 1312
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Nuevo FWH 18.01

Post by acuellar »

Estimado Antonio
Hago lo siguiente:

Code: Select all

 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
 
Modifiqué la clase así

Code: Select all

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
 
https://ibb.co/nMjQTS
https://ibb.co/g2txa7
https://ibb.co/gcCR2n


Cómo podría hacer para no modificar la clase

Muchas gracias por la ayuda.
Saludos,

Adhemar C.
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Nuevo FWH 18.01

Post by nageswaragunupudi »

Possible that you can simplify the code with something similar to this:

Code: Select all

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
 
If the button is disabled the text color is always GRAY.
If the button is active when the mouse is over the text color is BLUE and when the mouse is away the text color is black.
You may not need to use bMMoved block
Regards

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

Re: Nuevo FWH 18.01

Post by nageswaragunupudi »

This example can be used to test

Code: Select all

#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
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
acuellar
Posts: 1312
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Nuevo FWH 18.01

Post by acuellar »

Thanks Mr. Rao

Compiling this gives this error: D:\Sistemas\RRHH\DATA\PRG\RRHH.PRG(230) Error E0030 Syntax error "syntax error at 'BTNBMP'"

Code: Select all

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
 
Without the COLOR line, compile OK

The example compiles ok maybe it's because of the resource
Saludos,

Adhemar C.
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Nuevo FWH 18.01

Post by nageswaragunupudi »

Code: Select all

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
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
acuellar
Posts: 1312
Joined: Tue Oct 28, 2008 6:26 pm
Location: Santa Cruz-Bolivia

Re: Nuevo FWH 18.01

Post by acuellar »

Perfect!!

Thank you very much
Saludos,

Adhemar C.
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Nuevo FWH 18.05

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Nuevo FWH 18.11

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Marcelo Roggeri
Posts: 275
Joined: Sat Jul 22, 2006 9:04 pm
Location: Venado Tuerto - Santa Fe -Argentina
Contact:

Re: Nuevo FWH 20.07

Post by Marcelo Roggeri »

Hola buenos dias Antonio,
He probado xbrbar.prg: shows inbuilt buttonbar in xbrowse. en un ejemplo mio, y me hace el siguiente efecto al pulsar sobre la cabecera o sobre la buttonbar.
Adjunto un archivo gif para que aprecie el efecto que hace al poner
Image
Saludos
Marcelo
FWH - Harbour - BCC7 - PellesC - FivEdit (Cristobal Navarro)
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: Nuevo FWH 20.07

Post by nageswaragunupudi »

Yes.
This was a bug in FWH2006, fixed in FWH2007.
Whatsnew.txt
- When a column header is clicked, the header is painted in the topbar area
fixed.
http://forums.fivetechsupport.com/viewt ... 85#p233785
Please let us know if you are having this problem with FWH2007 also?
Regards

G. N. Rao.
Hyderabad, India
User avatar
Marcelo Roggeri
Posts: 275
Joined: Sat Jul 22, 2006 9:04 pm
Location: Venado Tuerto - Santa Fe -Argentina
Contact:

Re: Nuevo FWH 20.07

Post by Marcelo Roggeri »

Buenos días Mr. Rao, si efectivamente esto ocurrió en la FWH2007 es por eso que lo reporte en este hilo.
Saludos cordiales desde Argentina.
FWH - Harbour - BCC7 - PellesC - FivEdit (Cristobal Navarro)
Post Reply