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
buttonbar bottom size btns
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
buttonbar bottom size btns
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: buttonbar bottom size btns
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
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
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: buttonbar bottom size btns
Code: Select all
#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
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: buttonbar bottom size btns
Code: Select all
ACTIVATE DIALOG oDlgReport center ;
ON INIT ChangeButtons( oBar )
...
function ChangeButtons( oBar )
AEval( oBar:aControls, { | oCtrl | oCtrl:nTop += 2, oCtrl:nHeight -= 2 } )
return .T.
- Silvio.Falconi
- Posts: 4956
- Joined: Thu Oct 18, 2012 7:17 pm
Re: buttonbar bottom size btns
thanks
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC