Bug in buttonbar

Bug in buttonbar

Postby Enrico Maria Giordano » Sun Sep 27, 2009 12:18 pm

In the following sample please try to move the mouse over the button and you will see that the text will move down (and also the bitmap, if present):

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


FUNCTION MAIN()

    LOCAL oWnd, oBar

    DEFINE WINDOW oWnd

    DEFINE BUTTONBAR oBar OF oWnd 2007;
           SIZE 50, 70

    DEFINE BUTTON OF oBar;
           ACTION oWnd:End();
           PROMPT "Close"

    ACTIVATE WINDOW oWnd

    RETURN NIL


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

Re: Bug in buttonbar

Postby ukoenig » Sun Sep 27, 2009 2:31 pm

Enrico,

I tested Buttonbar, because of the new Font-changes. I couldn't notice this effect.
The effect of Your specification is included in VTitle using > ANIMATE < on Mouse-Caption.

Best Regards
Uwe :roll:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Bug in buttonbar

Postby Enrico Maria Giordano » Sun Sep 27, 2009 3:56 pm

You have to use the latest FWH release (9.09) in order to see the problem. It wasn't there in the previous releases.

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

Re: Bug in buttonbar

Postby ukoenig » Sun Sep 27, 2009 5:12 pm

Enrico,

I found the Reason for it.

With the new FWH 9.09, You can define Fonts for each Button of a Buttonbar.
It happens only with a not defined Button-Font once on Mouse-Caption.

Image

That works now :

DEFINE BUTTON oBtn1 OF oBar FILE c_path + "\system\format.bmp" MESSAGE "Test" ;
ACTION ( oWnd:End() ) ;
PROMPT "Test" FONT oBtnFont

oBtn1:SetColor( 0 ) // Black
oBtn1:cToolTip := { " " + CRLF + ;
"Test 1" + CRLF + ;
"Test 2", "T E S T", 1, 0, 128 }

Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Bug in buttonbar

Postby Enrico Maria Giordano » Mon Sep 28, 2009 7:15 am

This seems a possible fix (in paint method of TBtnBmp):

Code: Select all  Expand view
  if ::lBarBtn
      ::l2007 = ::oWnd:l2007
      IF ::oFont == NIL
         if ::oWnd:oFont != nil
            if ::oWnd:oFont:cFaceName != "Tahoma"
               DEFINE FONT oFont NAME "Tahoma" SIZE 0, -11
            endif
         else
             DEFINE FONT oFont NAME "Tahoma" SIZE 0, -11
         endif
         ::oWnd:SetFont( oFont )
         ::SetFont( oFont )     // EMG
      else
         ::oWnd:SetFont( ::oFont )
         ::SetFont( ::oFont )     // EMG
      endif
   else


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

Re: Bug in buttonbar

Postby TimStone » Tue Sep 29, 2009 7:18 pm

I can confirm this exact same problem. I am using default fonts, and I notice that not all buttons change position. If you move the cursor across the full button bar, all icons will then line up properly.

Pehaps this can be resolved in 9.10 ?
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2943
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 78 guests