FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour buttonbar bottom size btns
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
buttonbar bottom size btns
Posted: Thu Nov 26, 2020 11:54 AM
I made this buttonbar on bottom of dialog



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 March-April 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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: buttonbar bottom size btns
Posted: 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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: buttonbar bottom size btns
Posted: Thu Nov 26, 2020 12:41 PM
Code (fw): Select all Collapse
#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 March-April 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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: buttonbar bottom size btns
Posted: Thu Nov 26, 2020 12:50 PM
Code (fw): Select all Collapse
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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: buttonbar bottom size btns
Posted: Fri Nov 27, 2020 08:52 AM

thanks

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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

Continue the discussion