button Bar with two rows of buttons

button Bar with two rows of buttons

Postby reinaldocrespo » Wed Feb 29, 2012 4:49 pm

Hi everyone;

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

Image

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

Here my code:
Code: Select all  Expand view

   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.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: button Bar with two rows of buttons

Postby Enrico Maria Giordano » Wed Feb 29, 2012 11:11 pm

Yes, it is:

Code: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8712
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: button Bar with two rows of buttons

Postby reinaldocrespo » Thu Mar 01, 2012 3:12 am

Yes, excellent.


Reinaldo.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 91 guests