Como se ejecuta una accion del tercer control del grupo de outlook al dar click en el grupo.
Aqui el ejemplo
- Code: Select all Expand view
#include "fivewin.ch"
#include "outlook.ch"
#include "splitter.Ch"
static lBar := .t.
FUNCTION Main()
local oWnd, oOut, oSpl, oFont, oFont2, oBar, oBtn, oMenu
DEFINE FONT oFont NAME GetSysFont() SIZE 0,-14
MENU oMenu 2010
MENUITEM "&File"
MENUITEM "&Edit"
MENUITEM "&View"
MENUITEM "&Favourites"
MENUITEM "&Tools"
MENUITEM "&Actions"
MENUITEM "&?"
ENDMENU
DEFINE WINDOW oWnd FROM 2, 2 TO 35, 85 ;
MENU oMenu TITLE "Outlook control test"
DEFINE BUTTONBAR oBar _3d OF oWnd
DEFINE BUTTON oBtn RESOURCE "FORM" OF oBar NOBORDER ;
PRESSED ;
ACTION ( lBar := !lBar,;
oBtn:lPressed := lBar,;
oBtn:Refresh(),;
iif( !lBar, (oOut:Hide(), oSpl:Hide()),;
(oOut:Show(), oSpl:Show())) )
@ -1, -1 OUTLOOK oOut ;
SIZE 100, oWnd:nHeight() ;
PIXEL ;
FONT oFont ;
OF oWnd
SET MESSAGE OF oWnd TO "Outlook control test" DATE TIME KEYBOARD 2010
DEFINE GROUP OF OUTLOOK oOut PROMPT "&Principal"
DEFINE BITMAP OF OUTLOOK oOut ;
RESOURCE "FOLDER" ;
PROMPT "Outgoing messages" ;
ACTION msginfo("Your code ...", oSay:cCaption )
DEFINE BITMAP OF OUTLOOK oOut ;
RESOURCE "EXIT" ;
PROMPT "Exit from the application" ;
ACTION oWnd:End()
DEFINE BITMAP OF OUTLOOK oOut ;
RESOURCE "FOLDER" ;
PROMPT "Third control";
ACTION msginfo("Esta quiero que se ejecute" ) //Ejecutar esta accion
DEFINE BITMAP OF OUTLOOK oOut ;
RESOURCE "FOLDER" ;
PROMPT "Fourth control"
DEFINE BITMAP OF OUTLOOK oOut ;
RESOURCE "FOLDER" ;
PROMPT "This is the the fifth control"
DEFINE GROUP OF OUTLOOK oOut PROMPT "&More options"
DEFINE BITMAP OF OUTLOOK oOut ;
RESOURCE "FOLDER" ;
PROMPT "First button on second group bar"
DEFINE BITMAP OF OUTLOOK oOut ;
RESOURCE "FOLDER" ;
PROMPT "Second button on second group bar"
DEFINE BITMAP OF OUTLOOK oOut ;
RESOURCE "EXIT" ;
PROMPT "Third button"
DEFINE GROUP OF OUTLOOK oOut PROMPT "&Another extra group"
DEFINE BITMAP OF OUTLOOK oOut ;
RESOURCE "FOLDER" ;
PROMPT "First button"
DEFINE BITMAP OF OUTLOOK oOut ;
RESOURCE "FOLDER" ;
PROMPT "Second button"
@ 0, 100 SPLITTER oSpl ;
VERTICAL ;
PREVIOUS CONTROLS oOut ;
LEFT MARGIN 70 ;
RIGHT MARGIN 200 ;
SIZE 4, nil PIXEL ;
OF oWnd ;
_3DLOOK ;
UPDATE
ACTIVATE WINDOW oWnd ;
ON RESIZE oSpl:AdjRight()
RETURN NIL
Gracias por la ayuda
Saludos,
Adhemar