FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Migrando 15.02 a 16.02 -> BtnBar
Posts: 1283
Joined: Fri Feb 10, 2006 02:34 PM
Migrando 15.02 a 16.02 -> BtnBar
Posted: Thu Feb 25, 2016 03:30 PM
Hola,

Siguiendo con la migración de 15.01 a 16.01 encuentro tambien problemillas de estética en los
btnbar.

- Si no especificamos clausula se dibuja un border muy doble. Con las versiones 15.x se mostraban redoble amarillo (ya estaba bien), y con las 14.x en el standard nada si no te ponias encima

- El disable es horrible :-), por un lado en las 14.x estaba correcto el tema del colorgray, las 15.x y las 16.x mal

- En la 16.x el bitmap en disable se deforma una barbaridad




Por si quereis probar un ejemplo
Code (fw): Select all Collapse
#include 'fivewin.ch'

STATIC oWnd

FUNCTION TestWnd()

    LOCAL oHand, oBar, oIcon, oBtn

    DEFINE CURSOR oHand HAND 

    DEFINE WINDOW oWnd TITLE 'Test Buttons' 
        
        DEFINE BUTTONBAR oBar SIZE 40, 40 _3D OF oWnd 
            oBar:bRClicked := {|| NIL }
    
        DEFINE BUTTON       OF oBar NOBORDER  FILE '16Exit.bmp'  ACTION oWnd:End()   
        DEFINE BUTTON  oBtn OF oBar NOBORDER  FILE '16prn1.bmp'     ACTION msginfo( 'Hi')
            oBtn:Disable()      

    ACTIVATE WINDOW oWnd
    
RETU NIL


Alguien mas se ha encontrado con este problema y lo ha solucionado ?

Gracias !
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
HIX -> https://github.com/carles9000/hix
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Migrando 15.02 a 16.02 -> BtnBar
Posted: Thu Feb 25, 2016 05:00 PM

Charly,

gracias por comentárnoslo

Vamos a revisarlo cuanto antes :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Migrando 15.02 a 16.02 -> BtnBar
Posted: Mon Feb 29, 2016 10:36 AM
The problems pointed out relate to 16.01.
16.02 is yet to be released.

We regret that backward compatibility in case "noborder" buttons created on standard (non 200? style) buttonbars was broken from version 15.04. This is fixed in 16.02 to be released at anytime soon.

These are the fixes:

Bar.prg
For this code in line 27
Code (fw): Select all Collapse
   DATA  l3D, l97Look INIT .F.

Substitute ( comment out or remove INIT .F. )
Code (fw): Select all Collapse
   DATA  l3D, l97Look // INIT .F.


btnbmp.prg


At the end of the METHOD PaintBitmap(), add these 3 lines of code:
Code (fw): Select all Collapse
   if lGray .and. !( ::l2007 .or. ::l2010 .or. ::l2013 .or. ::l2015 )
      BtnDisable( ::hWnd, ::hDC )
   endif


In the METHOD PaintBorder(), please locate these lines:
Code (fw): Select all Collapse
               if ::l2007 .or. ::l2010 .or. ::l2013 .or. ::l2015
                  RoundBox( ::hDC, 2, 2, ::nWidth - 3, ::nHeight - 3, 6, 6,;
                            nRGB( 221, 207, 155 ) )
               endif

Please remove or comment out or remove or disable the if condtion:
Code (fw): Select all Collapse
               //if ::l2007 .or. ::l2010 .or. ::l2013 .or. ::l2015
                  RoundBox( ::hDC, 2, 2, ::nWidth - 3, ::nHeight - 3, 6, 6,;
                            nRGB( 221, 207, 155 ) )
               //endif
Regards



G. N. Rao.

Hyderabad, India

Continue the discussion