FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Buttonbar Hided RESOLVED
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Buttonbar Hided RESOLVED
Posted: Wed Nov 13, 2024 12:57 PM
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
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: 218
Joined: Mon Feb 07, 2022 09:54 PM
Re: Buttonbar Hided
Posted: Wed Nov 13, 2024 08:11 PM
Silvio,
you must build the button bar using the 'ON INIT' clause.
Like this:
Code (fw): Select all Collapse
#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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Buttonbar Hided
Posted: Thu Nov 14, 2024 08:56 AM
Detlef wrote:Silvio,
you must build the button bar using the 'ON INIT' clause.
Like this:
Code (fw): Select all Collapse
#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
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