Page 1 of 1

Two Buttonbars

Posted: Mon Feb 18, 2008 8:08 am
by Colin Haig
Hi All

How do I had a second buttonbar at the top of the window.

Cheers

Colin

Two ButtonBars

Posted: Mon Feb 18, 2008 8:09 am
by Colin Haig
Hi All

That should be "add" not had.

Cheers

Colin

Posted: Mon Feb 18, 2008 8:43 am
by Silvio
U must use Multibar class

Re: Two ButtonBars

Posted: Mon Feb 18, 2008 8:44 am
by Enrico Maria Giordano
This is a working sample:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oWnd

    LOCAL oBar, oBtn

    DEFINE WINDOW oWnd

    DEFINE BUTTONBAR OF oWnd 2007;
           SIZE 33, 33

    DEFINE BUTTON OF oWnd:oBar;
           FILE "C:\FWH\BITMAPS\OPEN.BMP";
           ACTION MSGINFO( "First bar Ok!" )

    @ 33, -1 BUTTONBAR oBar OF oWnd;
             SIZE 1602, 36;
             BUTTONSIZE 33, 33

    oBar:l2007 = .T.

    DEFINE BUTTON OF oBar;
           FILE "C:\FWH\BITMAPS\SAVE.BMP";
           ACTION MSGINFO( "Second bar Ok!" )

    ACTIVATE WINDOW oWnd

    RETURN NIL
EMG

Re: Two ButtonBars

Posted: Mon Feb 18, 2008 10:05 am
by hua
Enrico (or any others),
I normally find myself easily confuse when trying to manually code coordinates or sizes of controls. Could you explain how the figures in bold below come about? It'd be helpful for my understanding :) .


@ 33, -1 BUTTONBAR oBar OF oWnd;
SIZE 1602, 36;
BUTTONSIZE 33, 33

TIA

Re: Two ButtonBars

Posted: Mon Feb 18, 2008 10:22 am
by Enrico Maria Giordano
I found that coordinates just trying and looking at the result. :-)

EMG

Posted: Mon Feb 18, 2008 12:03 pm
by hua
Ah, the tried and tested method . Thanks for the reply anyway Enrico :)