Page 1 of 1
Buttonbar Hided RESOLVED
Posted: Wed Nov 13, 2024 12:57 pm
by Silvio.Falconi
I have this normal dialog ( no resizable)
But I cannot see the buttonbar is at Right , Why ?
DEFINE DIALOG oDlg ;
SIZE nWidth, nHeight PIXEL TRUEPIXEL ;
TITLE cTitle COLOR 0, CLR_WHITE FONT oFont
DEFINE BUTTONBAR oBar OF oDlg SIZE 60,25 RIGHT 2007 BORDER
DEFINE BUTTON aBtnBar[1] OF oBar PROMPT "Ritardatari" ACTION NIL
ACTIVATE DIALOG oDlg center
Re: Buttonbar Hided
Posted: Wed Nov 13, 2024 8:11 pm
by Detlef
Silvio,
you must build the button bar using the 'ON INIT' clause.
Like this:
Code: Select all | Expand
#include "FiveWin.ch"
FUNCTION Main()
//-------------
local oDlg
DEFINE DIALOG oDlg ;
SIZE 800, 600 PIXEL TRUEPIXEL ;
TITLE " Dialog" COLOR 0, CLR_WHITE
ACTIVATE DIALOG oDlg CENTER;
ON INIT BuildBar( oDlg )
RETURN NIL
FUNCTION BuildBar( oDlg )
//-----------------------
local oBar
local aBtn := array( 3 )
#define BTN_WIDTH 100
DEFINE BUTTONBAR oBar OF oDlg SIZE BTN_WIDTH, 70 2007
DEFINE BUTTON aBtn[ 1 ] OF oBar PROMPT "Button 1"
DEFINE BUTTON aBtn[ 2 ] OF oBar PROMPT "Button 2"
DEFINE BUTTON aBtn[ 3 ] OF oBar PROMPT "Button 3"
RETURN
Regards, Detlef
Re: Buttonbar Hided
Posted: Thu Nov 14, 2024 8:56 am
by Silvio.Falconi
Detlef wrote:Silvio,
you must build the button bar using the 'ON INIT' clause.
Like this:
Code: Select all | Expand
#include "FiveWin.ch"
FUNCTION Main()
//-------------
local oDlg
DEFINE DIALOG oDlg ;
SIZE 800, 600 PIXEL TRUEPIXEL ;
TITLE " Dialog" COLOR 0, CLR_WHITE
ACTIVATE DIALOG oDlg CENTER;
ON INIT BuildBar( oDlg )
RETURN NIL
FUNCTION BuildBar( oDlg )
//-----------------------
local oBar
local aBtn := array( 3 )
#define BTN_WIDTH 100
DEFINE BUTTONBAR oBar OF oDlg SIZE BTN_WIDTH, 70 2007
DEFINE BUTTON aBtn[ 1 ] OF oBar PROMPT "Button 1"
DEFINE BUTTON aBtn[ 2 ] OF oBar PROMPT "Button 2"
DEFINE BUTTON aBtn[ 3 ] OF oBar PROMPT "Button 3"
RETURN
Regards, Detlef
yes of course but... I not use buttonbar of fwh
I had the wrong control coordinates