Page 1 of 1

Little misalignment in prompt of TBtnBmp

Posted: Thu Dec 24, 2009 11:37 pm
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

Re: Little misalignment in prompt of TBtnBmp

Posted: Tue Dec 29, 2009 2:23 am
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:

Re: Little misalignment in prompt of TBtnBmp

Posted: Wed Dec 30, 2009 9:27 am
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

Re: Little misalignment in prompt of TBtnBmp

Posted: Wed Dec 30, 2009 4:03 pm
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 ?

Re: Little misalignment in prompt of TBtnBmp

Posted: Wed Dec 30, 2009 6:07 pm
by Enrico Maria Giordano
Dear friends, in order to help you I need of a reduced and self contained sample of the problem.

EMG

Re: Little misalignment in prompt of TBtnBmp

Posted: Wed Dec 30, 2009 8:49 pm
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:

Re: Little misalignment in prompt of TBtnBmp

Posted: Fri Jan 01, 2010 6:03 pm
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:

Re: Little misalignment in prompt of TBtnBmp

Posted: Fri Jan 01, 2010 7:36 pm
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
 

Re: Little misalignment in prompt of TBtnBmp

Posted: Fri Jan 01, 2010 8:07 pm
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: