Buttonbar Hided RESOLVED

Buttonbar Hided RESOLVED

Postby Silvio.Falconi » Wed Nov 13, 2024 12:57 pm

I have this normal dialog ( no resizable)

Image

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
Last edited by Silvio.Falconi on Thu Nov 14, 2024 10:09 am, edited 1 time in total.
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: 7061
Joined: Thu Oct 18, 2012 7:17 pm

Re: Buttonbar Hided

Postby Detlef » Wed Nov 13, 2024 8:11 pm

Silvio,
you must build the button bar using the 'ON INIT' clause.
Like this:
Code: Select all  Expand view
#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
User avatar
Detlef
 
Posts: 209
Joined: Mon Feb 07, 2022 9:54 pm

Re: Buttonbar Hided

Postby Silvio.Falconi » Thu Nov 14, 2024 8:56 am

Detlef wrote:Silvio,
you must build the button bar using the 'ON INIT' clause.
Like this:
Code: Select all  Expand view
#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

Image

I had the wrong control coordinates
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: 7061
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 30 guests