I decided to use the OUTLOOK style which I like and also In such window I want to add a TOOLBAR
Testing the TOOLBAR all looks nice but I have a problem:
When I start the app, the nice window show and on top there is a TOOLBAR with images shown for each "button", also very nice.
But when I move the mouse over any toolbar image, the image dissapears!
It looks like this
Here is the code that I use for testing:
- Code: Select all Expand view
function TEST_TOOLBAR1()
*-----------------------
local oWnd, oImageList
local oMenu
MENU oMenu
MENUITEM "&Project"
MENU
MENUITEM "&New..." ACTION MsgInfo( "New" ) MESSAGE "New"
MENUITEM "&Open..." ACTION MsgInfo( "Open" ) MESSAGE "Open"
SEPARATOR
MENUITEM "&Exit..." ACTION MsgInfo( "End" ) MESSAGE "Exit"
ENDMENU
MENUITEM "&Edit"
MENU
MENUITEM "&Search..." ACTION MsgInfo( "Search" )
MENUITEM "&Print..." ACTION MsgInfo( "Print" )
ENDMENU
MENUITEM "&Utilities"
MENU
MENUITEM "&Disable button..." ACTION oToolBar:EnableButton( 3, .f. )
MENUITEM "&Enable button..." ACTION oToolBar:EnableButton( 3, .t. )
ENDMENU
ENDMENU
DEFINE WINDOW oWnd TITLE "FWH - Testing Win32 Toolbars" ;
MENU oMenu
// First we build an ImageList with all the bitmaps
DEFINE IMAGELIST oImageList SIZE 32, 32
DEFINE IMGBITMAP OF oImageList NAME "newt1" COLOR nRGB( 255, 0, 255 )
DEFINE IMGBITMAP OF oImageList NAME "opent1" COLOR nRGB( 255, 0, 255 )
DEFINE IMGBITMAP OF oImageList NAME "checkt1" COLOR nRGB( 255, 0, 255 )
DEFINE IMGBITMAP OF oImageList NAME "searcht1" COLOR nRGB( 255, 0, 255 )
DEFINE IMGBITMAP OF oImageList NAME "printt1" COLOR nRGB( 255, 0, 255 )
DEFINE IMGBITMAP OF oImageList NAME "internett1" COLOR nRGB( 255, 0, 255 )
DEFINE IMGBITMAP OF oImageList NAME "keyst1" COLOR nRGB( 255, 0, 255 )
DEFINE IMGBITMAP OF oImageList NAME "quitt1" COLOR nRGB( 255, 0, 255 )
// Now we create the toolbar and add the buttons
DEFINE TOOLBAR oToolBar OF oWnd SIZE 50, 58 ; // 50, 50 ;
IMAGELIST oImageList BALLOON // tooltips balloon style
oToolBar:SetTextRows( 2 )
DEFINE TBBUTTON OF oToolBar ;
ACTION oToolbar:SetText( 1, "Hello" ) ; // Modify first button text
TOOLTIP "New" ;
PROMPT "&New project"
DEFINE TBBUTTON OF oToolBar ;
ACTION oToolBar:SetChecked( 2, .t. ) ; // Set pressed the second button
TOOLTIP "Open" ;
PROMPT "Open project" ;
DEFINE TBSEPARATOR OF oToolBar
DEFINE TBMENU OF oToolBar ;
ACTION MsgInfo( "Menu" ) ;
TOOLTIP "Menu" ;
PROMPT "Menu" ;
MENU BuildPopup()
DEFINE TBBUTTON OF oToolBar ;
ACTION oToolBar:SetChecked( 2, .f. ) ; // MsgInfo( "Search" ) ;
TOOLTIP "Search" ;
PROMPT "Search"
DEFINE TBBUTTON OF oToolBar ;
ACTION MsgInfo( "Print" ) ;
TOOLTIP "Print a report" ;
PROMPT "Print a report"
DEFINE TBSEPARATOR OF oToolBar
DEFINE TBBUTTON OF oToolBar ;
ACTION MsgInfo( "Upgrade" ) ;
TOOLTIP "Search for new versions" ;
PROMPT "Upgrade"
DEFINE TBBUTTON OF oToolBar ;
ACTION MsgInfo( "Users" ) ;
TOOLTIP "Users management" ;
PROMPT "Users"
DEFINE TBSEPARATOR OF oToolBar
DEFINE TBBUTTON OF oToolBar ;
ACTION oWnd:End() ;
TOOLTIP "End Application" ;
PROMPT "Exit"
DEFINE STATUSBAR OF oWnd PROMPT "Toolbars test"
ACTIVATE WINDOW oWnd MAXIMIZED
oImageList:End()
return nil
function BuildPopup()
*----------------------
local oMenu
MENU oMenu POPUP
MENUITEM "One" ACTION MsgInfo( "One" )
MENUITEM "Two" ACTION MsgInfo( "Two" )
MENUITEM "Three" ACTION MsgInfo( "Three" )
ENDMENU
return oMenu
I thought I will start using the new look today but spent all day with this problem.
I hope somebody has the help for me.
I am using FWH where the FIVEHMX.LIB is dated 29.01.2010