Little misalignment in prompt of TBtnBmp

Post Reply
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Little misalignment in prompt of TBtnBmp

Post by Enrico Maria Giordano »

In the following sample you will see that the prompt is not perfectly vertically centered:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oBtn

    DEFINE DIALOG oDlg

    @ 2, 2 BTNBMP oBtn;
           PROMPT "This is a test";
           SIZE 100, 20;
           CENTER NOBORDER

    oBtn:SetColor( CLR_WHITE, CLR_GREEN )

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL
EMG
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Little misalignment in prompt of TBtnBmp

Post by ukoenig »

Enrico,

I tested all 4 positiones.
it seems, there is a problem with TOP as well.

Image

Without Style 2007 it is OK
Image

Code: Select all

// --------------- Image --------------------

REDEFINE BTNBMP oBtn30 ID 30 OF oFld:aDialogs[1]  2007 ;
FILENAME c_path + "\Images\select.bmp" ;
TOP ;
PROMPT "  &Image-Select  " ;
FONT oProgFont ;
ACTION ( cFilter := "JPG (*.jpg)|*.jpg|" + ;
                                "BMP (*.bmp)|*.bmp|" + ;
                                 "DIB   (*.dib)| *.dib|" + ;
                                 "PCX   (*.pcx)| *.pcx|" + ;
                                 "JPEG  (*.jpg)| *.jpg|" + ;
                                 "PNG  (*.png)| *.png|" + ;
                                 "GIF   (*.gif)| *.gif|" + ;
                                 "TARGA (*.tga)| *.tga|" + ;
                                 "RLE   (*.rle)| *.rle|", ;
                 cNewBITM := cGetFile32( cFilter,"Select a Picture" ,, "\" + CurDir()+ "\IMAGES" ), ;
                 IIF( empty( cNewBITM ), MsgAlert( "No file selected !","ATTENTION" ), NIL ), ;
         W_IMAGE := cFileNoPath( cNewBITM ), oIMAGE:Refresh(), ;
         oLbx10:SetPos( 3 ), oLbx10:refresh(), ;
         W_STYLE := 3, oBMP10:Refresh() ) 

oBtn30:cToolTip = { "Select a " + CRLF + "Dialog-Background", "Dialog-Setting", 1, CLR_BLACK, 14089979 }    
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
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Little misalignment in prompt of TBtnBmp

Post by Enrico Maria Giordano »

Can you show a sample of the problem? The following sample works fine here:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oBtn

    DEFINE DIALOG oDlg

    @ 2, 2 BTNBMP oBtn;
           FILE "c:\fwh\bitmaps\open.bmp";
           PROMPT "This is a test";
           SIZE 100, 30;
           TOP NOBORDER 2007

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL
EMG
User avatar
DiGregorio
Posts: 42
Joined: Fri Nov 04, 2005 12:22 am
Location: Ven - Ita
Contact:

Re: Little misalignment in prompt of TBtnBmp

Post by DiGregorio »

Dear EmG,

there is also a misalignment when I click on btnbmp.
I can click only on down part of the button and not on top part
I associated a menu to a btnbmp and when I click on top the button not open any menu

If I click on down part of the button it open the menu
How I can resolve this problem ?
FWH/FWHX 9.10 + Harbour + xMate 1.5

Domenico Di Gregorio
Italia - Venezuela
stePyme 1.0
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

Re: Little misalignment in prompt of TBtnBmp

Post by Enrico Maria Giordano »

Dear friends, in order to help you I need of a reduced and self contained sample of the problem.

EMG
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Little misalignment in prompt of TBtnBmp

Post by ukoenig »

Enrico,

I'm working on a Update of the Button-Skin-Painter ( with a new Button-Editor for < TBtnBMP > ).
It still takes some time, to test and include all possible Settings inside a new Folder-page.
All 3 Button-Styles are included now :

Image

The Results of the new Preview TOP are OK. ( inside the Application, I have to find out the different Result )
Image

As soon I finished the new Tool-part, I will add a Download-link on this place.

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: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Little misalignment in prompt of TBtnBmp

Post by ukoenig »

Enrico,

first tests of the new Buttonbar- and Button-Painter shows the difference
of TOP and BOTTOM - Adjustment :

Image

Image

BOTTOM shows a Problem with Linefeed
the second Textline covers the BMP :

Image

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
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Little misalignment in prompt of TBtnBmp

Post by Antonio Linares »

Domenico,

Here there is an example that is working fine, could you please test it ? thanks :-)

Code: Select all

#include "FiveWin.ch"

function Main()

   local oWnd, oBtn

   DEFINE WINDOW oWnd

   @ 5, 10 BTNBMP oBtn PROMPT "teste" TOP SIZE 60, 64 OF oWnd 2007 ACTION MsgInfo( "click" )
   
   oBtn:bClrGrad = { | lMouseOver | If( ! lMouseOver,;
                                    { { 0.5, RGB( 69, 124, 188 ), RGB( 41, 93, 171 ) }, ;
                                      { 0.5, RGB( 26, 64, 136 ), RGB( 56, 135, 191 ) } },;
                                    { { 0.5, RGB( 123, 178, 236 ), RGB( 71, 126, 205 ) }, ;
                                      { 0.5, RGB( 17, 78, 175 ), RGB( 128, 225, 255 ) } } ) } 

   ACTIVATE WINDOW oWnd

return nil
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Little misalignment in prompt of TBtnBmp

Post by ukoenig »

Antonio,

it works perfect :

Image

Image

The Buttonbar-Test using Skin-Gradients NORMAL, FOCUS and PRESSED for the Buttonbar-Gradient :

Image

Now It is possible, to use the 3 Gradient-defines from the Skin-FolderPage.
It covers Normal and Focus.

I will add a painting of transparent Buttons as well, showing the 4 different Bitmaps
for Normal, Mousemove .. like :

FILENAME c_path + "\system\View_A.bmp", ;
c_path + "\system\View_P.bmp", ;
c_path + "\system\View_D.bmp", ;
c_path + "\system\View_M.bmp" ;
...
...

The Skin-Gradients used for BtnBMP as well ( double Function )

Image

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