buttonbar bottom size btns

buttonbar bottom size btns

Postby Silvio.Falconi » Thu Nov 26, 2020 11:54 am

I made this buttonbar on bottom of dialog

Image

how can i do to create a lower button than the buttonbar?
If you look at the figure, if I press a button that is the same height as the buttonbar, how can I make it lower than the buttonbar?
that is, maybe I don't explain well
since I created the button with the color of the dialog when you press a button it is not clear where the height of the button ends
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: buttonbar bottom size btns

Postby Antonio Linares » Thu Nov 26, 2020 12:33 pm

Dear Silvio,

You may do:

oBtn:nTop += 2
oBtn:nHeight -= 2

or

oBtn:SetSize( nWidth, nHeight )

if you post your source code we may be able to provide you a better help
regards, saludos

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

Re: buttonbar bottom size btns

Postby Silvio.Falconi » Thu Nov 26, 2020 12:41 pm

Code: Select all  Expand view


#include "fivewin.ch"
#include "constant.ch"

Function test()
   Local nBottom   := 55
   Local nRight    := 175
   Local nWidth :=  Max( nRight * DLG_CHARPIX_W, 180 )
   Local nHeight := nBottom * DLG_CHARPIX_H
local oDlgReport
 local oFontDialog,oFontBold

 DEFINE FONT oFontDialog NAME 'Tahoma' SIZE 0, -16
 DEFINE FONT oFontBold NAME 'Tahoma' SIZE 0, -14  BOLD
         

   DEFINE DIALOG oDlgReport        ;
   TITLE aTitle[ nMode ] + cReportNum     ;
   SIZE  960,580 PIXEL TRUEPIXEL RESIZABLE               ;
   COLOR CLR_BLACK,  nRgb( 245,244,234)
   oDlgReport:SetFont(oFontDialog)

 DEFINE BUTTONBAR oBar OF oDlgReport SIZE 80, 80  2015   BOTTOM

      DEFINE BUTTON OF oBar  ;
      RESOURCE "NO_DLG";
      PROMPT "Annulla" TOOLTIP "Esci" ;
      ACTION   ( oDlgReport:end( IDCANCEL ) )

      DEFINE BUTTON OF oBar  BTNRIGHT  ;
      RESOURCE "OK_DLG" ;
      PROMPT "Conferma" ;
      TOOLTIP "Conferma i dati" ;
      ACTION   ( oDlgReport:end( IDOK ) )


     oBar:bClrGrad := { | lPressed | If( ! lPressed,;
{ { 1, nRgb(233,229,206),nRgb(233,229,206) } },;
{ { 1, nRgb( 245,244,234), nRgb( 245,244,234) } } ) }

 oDlgReport:aMinMaxInfo := { nil, nil, ,, 1020,600,1020,600 }
    ACTIVATE DIALOG oDlgReport center
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm

Re: buttonbar bottom size btns

Postby Antonio Linares » Thu Nov 26, 2020 12:50 pm

Code: Select all  Expand view

ACTIVATE DIALOG oDlgReport center ;
   ON INIT ChangeButtons( oBar )

...

function ChangeButtons( oBar )

   AEval( oBar:aControls, { | oCtrl | oCtrl:nTop += 2, oCtrl:nHeight -= 2 } )

return .T.
regards, saludos

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

Re: buttonbar bottom size btns

Postby Silvio.Falconi » Fri Nov 27, 2020 8:52 am

thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7033
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 19 guests