by FranciscoA » Fri Jun 05, 2009 1:00 am
Silvio:
Here's an example of what you're looking for. I hope you find it useful. Please click on the printer-button on both bars.
#include "FiveWin.ch"
static oWnd
function Main()
local oBar, oPopup, oBtn
SetBalloon( .T. ) // Balloon shape required for tooltips
DEFINE WINDOW oWnd TITLE "FWH - Office 2007 look in your ButtonBars, MsgBar and Menus"
Barra1() //Main button-bar
SET MESSAGE OF oWnd TO "Testing the ButtonBar 2007 Office look" ;
CENTERED CLOCK KEYBOARD 2007
ACTIVATE WINDOW oWnd ;
VALID MsgYesNo( "Do you want to end?" )
return nil
//------------------------------
Function Barra1()
local oBar, oPopup, oBtn
DEFINE BUTTONBAR oBar OF oWnd SIZE 60, 60 2007
DEFINE BUTTON OF oBar ACTION Print() ;
RESOURCE "attach" PROMPT "Attach" TOOLTIP "Attach"
DEFINE BUTTON OF oBar ACTION MsgInfo( "Calendar" ) ;
RESOURCE "calendar" PROMPT "Calendar" WHEN .F. TOOLTIP "Calendar"
MENU oPopup POPUP
MENUITEM "One" ACTION MsgInfo( 1 )
MENUITEM "Two" ACTION MsgInfo( 2 )
ENDMENU
DEFINE BUTTON oBtn OF oBar ACTION oBtn:ShowPopup() ;
RESOURCE "people" PROMPT "Clients" GROUP ;
MENU oPopup TOOLTIP "Clients"
DEFINE BUTTON OF oBar ACTION Barra2(oBar) ; //second button-bar
RESOURCE "print" PROMPT "Print" TOOLTIP "Print"
Return nil
//------------------------------
Function Barra2(oBar1)
local oBar, oPopup, oBtn
oBar1:Hide()
DEFINE BUTTONBAR oBar OF oWnd SIZE 60, 60 2007
DEFINE BUTTON OF oBar ACTION Print() ;
RESOURCE "attach" PROMPT "Attach" TOOLTIP "Attach"
DEFINE BUTTON OF oBar ACTION ( MsgInfo("My Action"), oBar:End(), oBar1:Show() ) ;
RESOURCE "print" PROMPT "Print" TOOLTIP "Hi, Click me"
Return nil
Regards
Francisco.
Francisco J. Alegría P.
Chinandega, Nicaragua.
Fwxh-MySql-TMySql