FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour button Bar with two rows of buttons
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
button Bar with two rows of buttons
Posted: Wed Feb 29, 2012 04:49 PM
Hi everyone;

On a dialog I'd like to place two rows of buttons. Here is how it looks now:



But I need more buttons. I'm thinking a 2nd row would work. Is it possible?

Here my code:
Code (fw): Select all Collapse
   DEFINE BUTTONBAR oBar SIZE 26,26 TOP OF ::oDlg CURSOR oCursor _2007

   DEFINE BUTTON OF oBar RESOURCE "save16" ;
       TRANSPARENT ;
       MESSAGE "Save text" TOOLTIP "Save"  ;
        WHEN !oSelf:oActive:lReadOnly      ;
        ACTION oSelf:SaveTranscription()
        
    DEFINE BUTTON OF oBar RESOURCE "Printer16" ;
       TRANSPARENT ;
        MESSAGE "Print" TOOLTIP "Print"     ;
        ACTION ( CursorArrow(), ;
                 ReleaseCapture(), ;
                 oSelf:oActive:Print( oSelf:oActive:cFileName ) )


Thank you,


Reinaldo.
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: button Bar with two rows of buttons
Posted: Wed Feb 29, 2012 11:11 PM
Yes, it is:

Code (fw): Select all Collapse
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oWnd

    LOCAL oBar

    SETBALLOON( .T. )

    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!" );
           TOOLTIP "This is a test"

    @ 33, -1 BUTTONBAR oBar OF oWnd;
             SIZE 1602, 36;
             BUTTONSIZE 60, 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
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: button Bar with two rows of buttons
Posted: Thu Mar 01, 2012 03:12 AM

Yes, excellent.

Reinaldo.

Continue the discussion