Hola:
En los menús, cuando se activa el estilo 2015 y la opción tiene un when .f., el cursor por encima no se muestra plano.
Gracias.
// Autor: Cristobal Navarro
// Fecha: 01/01/2016
// Pruebas de Menus
//
#include "FiveWin.ch"
#include "wcolors.ch"
//----------------------------------------------------------------------------//
static oWnd
static oMru1
static oMru2
Static cColorPan
Static oFontMenu
//----------------------------------------------------------------------------//
function Main()
local oBar, oBar1, oBar2
local cTitle, x
Local cFont := "Segoe UI Symbol" // SemiBold" //"Calibri"
Local cFontH := -14
Local aFonts
FW_SetUnicode( .T. )
SetResDebug( .T. )
if !IsWin8() .and. !IsWindows10()
cFont := "Calibri"
endif
DEFINE FONT oFontMenu NAME cFont SIZE 0, cFontH WEIGHT 300
cTitle := " Menus: " + ;
if( !Empty( oFontMenu ), oFontMenu:cFaceName, "Font not defined " ) +;
if( !Empty( oFontMenu ), Str( oFontMenu:nHeight ), " " )
DEFINE WINDOW oWnd FROM 3, 6 TO 20, 70 MDI ;
TITLE cTitle MENU BuildMenu() COLOR CLR_WHITE, RGB( 116, 149, 193 )
//oWnd:SetFont( oFontMenu )
ACTIVATE WINDOW oWnd MAXIMIZED
if !Empty( oFontMenu )
While oFontMenu:nCount > 0
oFontMenu:End()
Enddo
endif
if File( "checkres.txt" )
FErase( "checkres.txt" )
endif
CheckRes()
return nil
//----------------------------------------------------------------------------//
Function BuildMenu( oW )
Local oMenu
Local oMnu
Local oGraba
Local cPrompt := " "
DEFAULT oW := oWnd
MENU oMenu 2015 FONT oFontMenu
MENUITEM "&Archivos" COLORMENU CLR_BLUE ITALIC
MENU
MENUITEM "&Nuevo item Mru" CHECKED
MENUITEM "&Files " COLORRIGHT CLR_HBLUE
MENU
MENUITEM "&Nuevo" CHECK
MENUITEM "&Open" CHARICON "A" ITALIC
SEPARATOR
MENUITEM "&Nuevo proceso" CHARICON "P" RIGHTCOLOR CLR_HRED BOLD
ENDMENU
MENUITEM "&New " CHARICON 57696
MENUITEM "&Child " RESOURCE "new" BOLD
MENUITEM "&New " DISABLED
SEPARATOR
MENUITEM "&Salir" ACTION oWnd:End() COLORRIGHT CLR_HRED BOLD ITALIC
ENDMENU
MENUITEM "E&ditar" COLORMENU CLR_RED BOLD
MENU
MENUITEM "&Nuevo" CHECKED
MENUITEM "&Open" CHARICON "A" ITALIC
MENUITEM "&1.- Item 1" RESOURCE "icon" DISABLED
MENUITEM "&2.- Item 2" CHARICON 58020 COLORRIGHT CLR_YELLOW
MENUITEM "&3.- Item 3" CHARICON 57696 BOLD ITALIC
MENUITEM "&4.- Item 4" CHARICON 57756 COLORRIGHT CLR_HRED
MENUITEM "&5.- Item 5" CHARICON 57736 COLORRIGHT CLR_MAGENTA
SEPARATOR
MENUITEM "&Grabar como." CHARICON 57605
ENDMENU
MENUITEM "&Buscar" COLORMENU CLR_GREEN
MENU
MENUITEM "&Nuevo" CHECKED
MENUITEM "&Open" CHARICON "A"
SEPARATOR
MENUITEM "Uno" RESOURCE "icon" DISABLED
MENUITEM "Dos" WHEN .F. CHARICON 58020
MENUITEM "* SEPARATOR" + CRLF + "- Linea 2 " SEPARATOR COLORRIGHT CLR_HBLUE
MENUITEM "Tres" CHARICON 57696 COLORRIGHT CLR_GREEN
MENUITEM "Cuatro" CHARICON 57756 BOLD
MENUITEM "Cinco" CHARICON 57736 BOLD ITALIC
SEPARATOR
MENUITEM "&Grabar como." CHARICON 57605
ENDMENU
MENUITEM "&Modificar" COLORMENU CLR_BROWN BOLD ITALIC
MENU
MENUITEM "&Nuevo proceso" CHARICON "P"
SEPARATOR
MENUITEM "&Abrir" + CRLF + "Linea 2" CHARICON "W" COLORRIGHT CLR_BLUE BOLD
MENUITEM "&Nuevo" CHECKED DISABLED
MENUITEM "SEPARATOR" + CRLF + "Linea 2" SEPARATOR BOLD ITALIC COLORRIGHT CLR_HRED
MENUITEM "&Grabar como." RESOURCE "icon"
ENDMENU
//oMenu:AddEdit()
//oMenu:AddMdi()
oMenu:AddFile()
oMenu:AddHelp( "FiveWin Menus", "FiveTech 1993-2015" )
ENDMENU
Return oMenu
//----------------------------------------------------------------------------//
#include "FiveWin.ch"
static oWnd
//----------------------------------------------------------------------------//
function Main()
SET _3DLOOK ON
DEFINE WINDOW oWnd FROM 1, 1 TO 22, 75 ;
TITLE "Test Menu" MENU BuildMenu() ;
MDI
SET MESSAGE OF oWnd TO FWVERSION CLOCK DATE KEYBOARD NOINSET 2015
ACTIVATE WINDOW ownd MAXIMIZED
RETURN NIL
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
MENU oMenu 2015
MENUITEM "Item 1"
MENU
MENUITEM "Item 1 - Sub 1" MESSAGE "Item 1 - Sub 1" ;
ACTION MsgInfo( "any action" ) ;
ACCELERATOR 0, VK_F2
MENUITEM "Item 1 - Sub 2" MESSAGE "Item 1 - Sub 2" when .f.
ENDMENU
MENUITEM "Item 2"
MENU
MENUITEM "Item 2 - Sub 1" MESSAGE "Item 2 - Sub 1"
MENUITEM "Item 2 - Sub 2" MESSAGE "Item 2 - Sub 2"
ENDMENU
MENUITEM "Short"
MENU
MENUITEM "abcd" MESSAGE "dd"
ENDMENU
MENUITEM "Shorter"
MENU
MENUITEM "ab" MESSAGE "dd"
ENDMENU
MENUITEM "&Exit"
ENDMENU
return oMenu
skinMenu.clr_gradGrayed1_1 = RGB( 235, 236, 236 );//RGB( 244, 245, 245 ); //Interior caja seleccion items no activos mitad superior
skinMenu.clr_gradGrayed1_2 = RGB( 235, 236, 236 );
skinMenu.clr_gradGrayed2_1 = RGB( 235, 236, 236 ); //Interior caja seleccion items no activos mitad inferior
skinMenu.clr_gradGrayed2_2 = RGB( 235, 236, 236 );//RGB( 227, 228, 228 );
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 91 guests