Page 1 of 1
ButtonBmp does not work popup menus
Posted: Thu Nov 07, 2024 8:21 pm
by Giovany Vecchi
How do I put a pop up menu on a button of the TButtonBmp class?
I'm doing it like this:
Code: Select all | Expand
MENU ::oMenuPlanejamentos POPUP 2015
MENUITEM lc_oaMnuItensPlanejamentos[1] Prompt "Imprimir Planejamento" ;
Resource "B16M_PRINTERNORMAL" ;
OF ::oMenuPlanejamentos
lc_oaMnuItensPlanejamentos[1]:bAction := <||
MsgInfo("Teste")
Return Nil
>
ENDMENU
Redefine ButtonBmp lc_oBtn2251_PrnSolicitacao ;
Id 2251 Of ::oFld991_Pages:aDialogs[2] BitMap 0xF56D ;
Prompt "Planejamentos" ;
ToolTip "Menu de opções dos planejamentos de pagamentos dos titulos referenciados na lista"
lc_oBtn2251_PrnSolicitacao:Super:oMenu := ::oMenuPlanejamentos // Doesn't work
lc_oBtn2251_PrnSolicitacao:oMenu := ::oMenuPlanejamentos // Doesn't work
lc_oBtn2251_PrnSolicitacao:Super:oPopUp := ::oMenuPlanejamentos // Doesn't work
lc_oBtn2251_PrnSolicitacao:oPopUp := ::oMenuPlanejamentos // Doesn't work
Re: ButtonBmp does not work popup menus
Posted: Fri Nov 08, 2024 9:26 am
by Marc Venken
Re: ButtonBmp does not work popup menus
Posted: Fri Nov 08, 2024 1:22 pm
by karinha
Code: Select all | Expand
// C:\FWH\SAMPLES\BTN.PRG y BTN.RC
#include "Fivewin.ch"
#include "Ribbon.ch"
FUNCTION Main()
LOCAL oDlg, oBtn, oAceptar, oCancelar, oFont, oBtnRb1, oBtnBmp
SetBalloon( .T. ) // Balloon shape required for tooltips
SkinButtons()
DEFINE FONT oFont NAME "Ms Sans Serif" SIZE 00, - 16 BOLD
DEFINE DIALOG oDlg RESOURCE "TEST" TITLE "TESTE DE BTNBMP FWH19.05"
oDlg:lHelpIcon := .F.
REDEFINE BTNBMP oBtn ID 101 OF oDlg RESOURCE "TEST" PROMPT "&Teste" ;
FLAT 2007 FONT oFont
oBtn:cToolTip := "Test BITMAP 16 x 16"
oBtn:nRound := 60
REDEFINE BTNBMP oAceptar ID 301 OF oDlg RESOURCE "ACEPTAR" ;
PROMPT "&BTNBMP" FLAT 2007 NOBORDER ROUND FONT oFont LEFT ;
oAceptar:oPopUp := {| oAceptar | BtnPopMenu( oBtn ) }
oAceptar:cToolTip := "Aceptar BITMAP 32 x 32"
REDEFINE BTNBMP oCancelar ID 302 OF oDlg RESOURCE "CANCELAR" ;
PROMPT "&Cancelar" FLAT 2007 NOBORDER ROUND FONT oFont LEFT ;
ACTION( oDlg:End() )
oCancelar:cToolTip := "Cancelar BITMAP 32 x 32"
oCancelar:lCancel := .T.
oCancelar:SetThemed( .T. )
REDEFINE RBBTN oBtnRb1 ID 201 OF oDlg POPUP ;
MENU BuildPopup() ROUND ACTION MsgInfo( "click" ) ;
PROMPT "TRBtn" BITMAP "..\bitmaps\16x16\fivetech.bmp" LEFT
// NO FUNCIONA CON MENU
REDEFINE BUTTONBMP oBtnBmp ID 202 OF oDlg ;
PROMPT "BUTTONBMP" RESOURCE "ACEPTAR" TEXTRIGHT
oBtnBmp:oPopUp := {| oBtnBmp | BuildPopup() } // NO FUNCIONA.
ACTIVATE DIALOG oDlg CENTERED
oFont:End()
RETURN NIL
FUNCTION BuildPopup()
LOCAL oPopup
MENU oPopup POPUP 2007
MENUITEM "One" ACTION MsgInfo( "One" ) FILE "..\bitmaps\16x16\fivetech.bmp"
MENUITEM "Two" ACTION MsgInfo( "Two" ) FILE "..\bitmaps\16x16\fivetech.bmp"
SEPARATOR
MENUITEM "Three" ACTION MsgInfo( "Three" ) FILE "..\bitmaps\16x16\fivetech.bmp"
ENDMENU
RETURN( oPopup )
FUNCTION BtnPopMenu( oBtn )
LOCAL oPopUp
MENU oPopUp POPUP 2007
MENUITEM "Cadastro de Clientes" ;
RESOURCE "TEST" COLORRIGHT CLR_HBLUE BOLD ;
MESSAGE "Cadastro de Clientes - Pesquisas."
ENDMENU
RETURN( oPopUp )
// FIN / END
Regards, saludos.
Re: ButtonBmp does not work popup menus
Posted: Fri Nov 08, 2024 1:24 pm
by karinha
Code: Select all | Expand
/****************************************************************************
btn.rc
produced by Borland Resource Workshop
*****************************************************************************/
ACEPTAR BITMAP
{
'42 4D 36 0C 00 00 00 00 00 00 36 00 00 00 28 00'
'00 00 20 00 00 00 20 00 00 00 01 00 18 00 00 00'
'00 00 00 0C 00 00 13 0B 00 00 13 0B 00 00 00 00'
'00 00 00 00 00 00 F1 60 FA F1 60 FA F1 60 FA F1'
'60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60'
'FA F1 60 FA E9 E9 E9 C6 C6 C7 A8 A8 A9 8E 8E 8F'
'7B 7B 7C 6E 6E 6F 6E 6E 6F 7B 7B 7C 8E 8E 8F A8'
'A8 A9 C6 C6 C7 E9 E9 E9 F1 60 FA F1 60 FA F1 60'
'FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA'
'F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1'
'60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA D9 D9'
'D9 A9 A9 AA 7F 7F 80 A1 A2 A2 BC BC BC D4 D3 D4'
'E8 E7 E8 F5 F8 F6 F7 F7 F6 E6 E8 E8 D3 D3 D2 B9'
'BB BB 9F 9E 9E 7F 7F 80 A9 A9 AA D9 D9 D9 F1 60'
'FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA'
'F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1'
'60 FA F1 60 FA F1 60 FA EB EB EB B0 B0 B0 8F 8F'
'8F BD BC BD E8 E8 E8 D5 D5 D5 BB BE BB 95 A5 98'
'63 8F 69 46 8A 50 47 8F 53 67 9A 70 9A AF 9E C2'
'C8 C3 DE DD DE E1 E0 E1 B8 B9 B9 8F 8F 90 B0 B0'
'B0 EB EB EB F1 60 FA F1 60 FA F1 60 FA F1 60 FA'
'F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1'
'60 FA F1 60 FA D7 D7 D8 95 95 95 B8 B8 B9 EB EB'
'EB CE CE CD 9A AA 9A 4E 8B 50 11 80 13 06 8C 06'
'00 9C 01 00 A4 05 00 AF 0A 00 BB 0F 06 BE 15 10'
'B4 28 45 A8 57 99 B5 A1 D7 D7 D6 E7 E7 E8 B8 B8'
'B9 95 95 95 D7 D7 D8 F1 60 FA F1 60 FA F1 60 FA'
'F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1'
'60 FA D1 D1 D1 90 90 91 D3 D3 D3 D9 D9 D9 85 90'
'87 2B 77 2F 04 7B 04 00 7E 00 00 84 00 00 91 00'
'00 9D 03 00 A4 06 00 AE 0A 00 B7 10 00 C2 14 00'
'CD 19 00 DA 16 04 DF 21 1E AC 3C 74 88 79 DD DD'
'DD D3 D3 D3 90 90 91 D1 D1 D1 F1 60 FA F1 60 FA'
'F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA D7'
'D7 D8 90 90 91 E1 E1 E1 C1 C1 C1 50 74 52 0A 73'
'0A 00 7B 00 00 79 00 15 8A 1A 38 98 3C 00 82 00'
'00 97 00 00 A2 05 00 AC 09 00 B5 0E 00 BF 12 00'
'C9 16 00 D2 1C 00 DD 1F 00 E9 22 0A E1 2C 44 8C'
'54 C6 C6 C6 E1 E1 E1 90 90 91 D7 D7 D8 F1 60 FA'
'F1 60 FA F1 60 FA F1 60 FA F1 60 FA EB EB EB 95'
'95 95 D3 D3 D3 C0 C0 C0 4E 7C 50 01 77 01 00 7C'
'00 00 77 00 38 97 3A F3 FC F4 FF FF FF 63 AC 68'
'00 86 00 00 A2 04 00 AA 08 00 B1 0B 00 BB 10 00'
'C3 14 00 CC 19 00 D4 1C 00 DD 20 00 E7 23 01 F0'
'24 39 99 4D C5 C5 C5 D4 D4 D4 95 95 95 EB EB EB'
'F1 60 FA F1 60 FA F1 60 FA F1 60 FA B0 B0 B0 B8'
'B8 B9 D9 D9 D9 45 76 48 01 7F 01 00 82 00 00 79'
'00 11 84 13 EB FA EE FF FF FF FF FF FF FA FB FB'
'0F 8A 15 00 98 00 00 A7 06 00 AE 09 00 B6 0E 00'
'BE 11 00 C6 15 00 CD 1A 00 D6 1C 00 DD 20 00 E4'
'24 00 ED 22 3A 91 4C DC DC DC B9 B9 BA B0 B0 B0'
'F1 60 FA F1 60 FA F1 60 FA D9 D9 D9 8E 8F 8F E1'
'E1 E1 92 A5 93 05 86 05 00 8A 00 00 81 00 03 80'
'04 CC E7 CD FF FF FF FF FF FF FD FD FD FF FF FF'
'8D C0 8E 00 87 00 00 A0 03 00 AA 06 00 B1 0A 00'
'B8 0F 00 C0 12 00 C8 15 00 CF 19 00 D4 1C 00 DB'
'1F 00 E0 20 05 E1 22 6A 8B 71 E7 E6 E6 8F 8E 90'
'D9 D9 D9 F1 60 FA F1 60 FA A9 A9 AA BD BD BE D1'
'D1 D1 1A 83 1A 00 8F 00 00 8B 00 00 80 00 B8 DD'
'BB FF FF FF FF FF FF FB FA FB F4 F3 F3 EF EE EF'
'FA F3 FA 38 A0 3F 00 8F 00 00 A7 05 00 AC 08 00'
'B4 0C 00 B9 0F 00 C0 11 00 C7 15 00 CB 18 00 D1'
'1A 00 D5 1C 00 DB 1D 14 B8 2B C7 CC C8 BF BE BE'
'A9 A9 AA F1 60 FA E9 E9 E9 7F 7F 80 DE DD DD 91'
'AF 97 01 96 01 00 92 00 00 85 00 A8 D6 AA FF FF'
'FF FF FF FF F9 F8 F9 FC F8 FC F0 EE F1 E7 E7 E7'
'F4 ED F2 A7 CA A9 00 8A 00 00 99 00 00 A9 05 00'
'AE 08 00 B4 0B 00 B8 0E 00 BF 12 00 C2 13 00 C8'
'15 00 CB 18 00 CD 19 00 D3 16 76 AF 81 E9 E8 E9'
'80 80 81 E9 E9 E9 C6 C6 C7 A2 A2 A2 D8 D8 D9 38'
'9E 50 00 9A 00 03 90 03 B6 DD B8 FF FF FF FE FE'
'FE F6 F5 F8 FF FA FF 69 BD 6C B2 D3 B4 ED E7 EC'
'E7 E7 E8 F5 F1 F5 5D AB 62 00 8F 00 00 A0 03 00'
'AA 06 00 AD 08 00 B3 0B 00 B6 0E 00 BB 10 00 BF'
'11 00 C1 12 00 C3 13 00 C7 13 18 A5 2A DA DA D9'
'A2 A2 A2 C6 C6 C7 A8 A8 A9 C0 C0 C0 BB C4 BD 0C'
'A6 2D 2A AD 45 D2 EC D3 FF FF FF FB FB FB F5 F3'
'F5 FF FA FF 76 C5 78 00 81 00 30 A1 34 F5 F1 F5'
'E2 DE E1 EF ED EF E4 E4 E5 10 91 16 00 96 00 00'
'A6 04 00 A8 05 00 AC 07 00 AF 0A 00 B4 0B 00 B7'
'0E 00 B8 0F 00 B9 0F 00 BC 10 05 B8 13 A9 C0 AE'
'BF BE BF A8 A8 A9 8E 8E 8F DA DA DA 8F B0 98 00'
'AC 20 BE EC C9 FF FF FF F8 F8 F8 F8 F3 F6 FF F9'
'FF 72 C8 77 00 8D 00 00 90 00 00 8C 00 7D B7 81'
'F2 EF F4 DE DD DE EE EB EF 9E C2 A1 00 8F 00 00'
'98 00 00 A3 03 00 A7 04 00 AA 05 00 AC 07 00 AE'
'08 00 AF 09 00 B1 0B 00 B2 0B 00 B2 08 6E AB 77'
'D7 D8 D7 8E 8E 8F 7B 7B 7C ED ED ED 66 A9 75 00'
'B3 29 7C D9 92 FF FF FF FF FD FF EB F2 EB 53 BF'
'55 00 96 00 00 99 00 00 96 00 00 90 00 18 9D 1C'
'EC EA ED DC D8 DA E0 E0 E0 F0 EC F0 3A 9E 41 00'
'8D 00 00 A0 00 00 A1 00 00 A4 03 00 A6 04 00 A8'
'05 00 A9 05 00 A9 06 00 A9 06 00 AA 07 44 99 45'
'EB EA EB 7B 7B 7C 6E 6E 6F FB FB FB 49 A3 5F 10'
'BC 38 09 B5 30 57 CA 70 8A DB 9E 2C BB 48 00 9E'
'00 00 A0 00 00 9E 00 00 9C 00 00 98 00 00 93 00'
'59 A7 5D EF EA EF DC D9 DA E4 E2 E4 E0 E5 E2 00'
'8C 04 00 93 00 00 9D 00 00 9E 00 00 9F 00 00 A1'
'01 00 A1 01 00 A1 03 00 A1 03 00 A0 03 2F 91 2F'
'F9 FA F9 6E 6E 6F 6E 6E 6F FB FB FB 48 AA 5F 14'
'C2 3E 12 BD 3A 05 B6 2E 00 B2 26 06 B2 2E 08 B1'
'2F 00 A9 0E 00 A2 00 00 A0 00 00 9D 00 00 98 00'
'00 99 03 AB BD AD ED E9 EC DC DA DD EE EB EE 76'
'AD 77 00 8A 00 00 92 00 00 9A 00 00 9A 00 00 9C'
'00 00 9C 00 00 9A 00 00 9A 00 00 98 00 2C 8D 2C'
'FA FB FB 6E 6E 6F 7B 7B 7C ED ED ED 5F B5 73 19'
'C8 41 16 C3 3E 14 C0 3C 13 BD 3B 11 B9 37 10 B6'
'37 0E B3 36 01 AD 23 00 A7 05 00 A1 00 00 9D 00'
'00 99 00 27 9E 2C EC E7 EC D9 D6 DB DB DB DC EB'
'EC EB 28 91 2B 00 8A 00 00 97 00 00 97 00 00 97'
'00 00 96 00 00 96 00 00 95 00 00 93 00 49 91 49'
'ED EC ED 7B 7B 7C 8E 8E 8F DA DA DA 80 BF 8F 1A'
'CD 43 1A C9 42 19 C6 41 15 C2 3D 13 BF 3C 12 BC'
'39 11 B9 38 11 B6 38 0B B3 33 00 AC 1F 00 A6 08'
'00 A0 00 00 9C 00 6F B0 71 EE E8 EE DC DB DE E5'
'E4 E6 CA DC CA 00 86 01 00 8F 00 00 96 00 00 94'
'00 00 92 00 00 92 00 00 8F 00 01 8E 01 75 A1 74'
'DA D9 DA 8E 8E 8F A8 A8 A9 C0 C0 C0 AC CB B4 1C'
'D2 46 1E CD 46 1B CB 45 1A C8 42 19 C5 3F 16 C2'
'3E 14 BF 3C 12 BC 3A 11 B8 37 10 B5 38 0C B2 36'
'05 AE 29 00 A7 14 00 A3 0E CA D6 CD ED E8 EC E1'
'DE E1 ED EA ED 78 AF 7A 00 84 00 00 8F 00 00 90'
'00 00 8E 00 00 8E 00 00 8D 00 04 8B 04 A6 BD A7'
'C0 C1 C1 A8 A8 A9 C6 C6 C7 A2 A2 A2 D6 DD D9 37'
'CF 5A 22 D3 49 1F D1 48 1E CD 46 1C CA 44 1A C8'
'43 19 C6 41 16 C1 3E 14 BE 3B 13 BB 3A 11 B8 37'
'10 B6 37 0F B2 37 00 AB 27 39 B4 55 F3 EF F2 E7'
'E3 E6 E7 E5 E7 FA F5 FA 3D 99 40 00 89 00 00 8C'
'00 00 8F 00 00 8D 00 00 8C 00 1B 8A 1C D3 D9 D5'
'A3 A3 A3 C6 C6 C7 E9 E9 E9 7F 7F 80 EB EB EB 70'
'C5 84 24 DB 4E 25 D6 4E 23 D3 4B 1F D1 48 1E CD'
'46 1D CB 45 1A C7 43 19 C5 41 18 C1 3E 15 BD 3C'
'13 BC 3A 11 B7 38 10 B4 36 00 AD 25 82 CC 93 FC'
'F2 FA EE EE EE F9 F5 F9 EF F1 F1 1B 8F 32 00 8E'
'12 00 97 22 00 93 1E 00 8F 1C 5A 9E 66 E6 E7 E7'
'7F 7F 80 E9 E9 E9 F1 60 FA A9 A9 AA BF BF BF C0'
'D1 C3 30 DF 59 28 DC 52 27 DA 50 25 D6 4E 24 D3'
'4C 22 D1 49 1F CD 47 1E CA 45 1B C7 44 1A C5 42'
'18 C1 3F 16 BF 3D 14 BC 3B 0E B7 36 0C B4 32 A9'
'DC B4 FF F6 FE F5 F6 F6 FF FF FF CD E4 D3 03 8A'
'1E 00 95 18 00 9A 24 0A 93 24 B8 C9 BC BD BD BD'
'A9 A9 AA F1 60 FA F1 60 FA D9 D9 D9 8F 8F 8F ED'
'ED ED 72 C3 85 27 E1 51 29 DE 55 28 DC 53 27 D9'
'50 25 D7 4E 23 D3 4B 22 D0 49 1F CD 47 1E CA 46'
'1C C8 44 1B C5 43 19 C1 3E 16 BE 3D 0A B7 33 2D'
'BF 4F C3 EB CB FF FF FF FF FF FF FF FF FF 8E C9'
'9B 00 8F 17 05 A2 28 5B A1 6B E9 E8 E9 8F 8F 8F'
'D9 D9 D9 F1 60 FA F1 60 FA F1 60 FA B0 B0 B0 B8'
'B8 B9 D8 DE D9 54 DC 73 2D E2 56 2D E0 56 2A DE'
'55 29 DC 53 27 D9 51 26 D5 4E 24 D3 4C 22 D0 4B'
'20 CD 48 1F CA 47 1D C8 45 1B C5 42 1A C1 41 08'
'B9 31 61 D2 7B CC F0 D4 FF FF FF FF FF FF CC F0'
'D4 62 BB 77 20 96 37 CE D6 D0 B8 B8 B9 B0 B0 B0'
'F1 60 FA F1 60 FA F1 60 FA F1 60 FA EB EB EB 95'
'95 95 D3 D3 D3 C0 CE C3 4A E3 6E 2F E6 59 30 E4'
'59 2E E1 56 2C DF 56 29 DC 53 28 D9 51 27 D6 4E'
'25 D3 4D 24 D1 4C 22 CD 49 1F CA 47 1E C7 46 1C'
'C3 43 09 BC 33 8A E2 9F CC F0 D4 E4 F7 E8 7C D7'
'92 5C BA 72 AA BF AF D3 D3 D3 95 95 95 EB EB EB'
'F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA D7'
'D7 D8 90 90 91 E1 E1 E1 BE CF C2 55 E3 76 2F E7'
'59 31 E6 5A 30 E4 59 2E E0 57 2D DD 56 2A DB 53'
'29 DA 52 28 D6 50 26 D3 4E 24 D0 4C 23 CC 4B 20'
'CA 48 1D C7 44 13 C1 3C 52 CF 6F 4B CB 68 59 BD'
'70 A5 C0 AB E1 E1 E1 90 90 91 D7 D7 D8 F1 60 FA'
'F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1'
'60 FA D1 D1 D1 90 90 91 D3 D3 D3 D6 DF D8 7A DB'
'90 36 EA 60 31 E8 5B 32 E6 5B 31 E4 5B 2F E0 58'
'2E DF 57 2D DC 55 2A DA 52 28 D6 51 27 D3 50 26'
'D1 4D 24 CD 4C 20 CB 48 16 C3 3E 3D AE 58 C2 D7'
'C7 D3 D3 D3 90 90 91 D1 D1 D1 F1 60 FA F1 60 FA'
'F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1'
'60 FA F1 60 FA D7 D7 D8 95 95 95 B8 B8 B9 ED ED'
'ED C0 DC C7 7F E0 95 3A E8 61 31 E8 5B 30 E6 5A'
'31 E4 5B 30 E1 59 2E DE 57 2D DC 53 29 DA 53 29'
'D5 52 2E CF 54 52 C4 6C 9B CE A7 E3 E6 E3 B8 B8'
'B9 95 95 95 D7 D7 D8 F1 60 FA F1 60 FA F1 60 FA'
'F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1'
'60 FA F1 60 FA F1 60 FA EB EB EB B0 B0 B0 8F 8F'
'8F BE BE BE EA E9 EA CD E3 D2 AB DD B6 8C DA 9D'
'70 D8 88 59 D4 76 4F D1 6D 67 C9 7E 88 D0 98 AA'
'D7 B6 CC E0 D0 E6 E9 E6 BF BF BF 8F 8F 8F B0 B0'
'B0 EB EB EB F1 60 FA F1 60 FA F1 60 FA F1 60 FA'
'F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1'
'60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA D9 D9'
'D9 A9 A9 AA 7F 7F 80 A2 A2 A2 C0 C0 C0 DA DA DA'
'ED ED ED FB FB FB FB FB FB ED ED ED D8 D8 D8 BD'
'BF BD A2 A1 A2 7F 7F 80 A9 A9 AA D9 D9 D9 F1 60'
'FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA'
'F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1'
'60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60'
'FA F1 60 FA E9 E9 E9 C6 C6 C7 A8 A8 A9 8E 8E 8F'
'7B 7B 7C 6E 6E 6F 6E 6E 6F 7B 7B 7C 8E 8E 8F A8'
'A8 A9 C6 C6 C7 E9 E9 E9 F1 60 FA F1 60 FA F1 60'
'FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA F1 60 FA'
'F1 60 FA F1 60 FA'
}
CANCELAR BITMAP
{
'42 4D F6 06 00 00 00 00 00 00 36 00 00 00 28 00'
'00 00 18 00 00 00 18 00 00 00 01 00 18 00 00 00'
'00 00 C0 06 00 00 C4 0E 00 00 C4 0E 00 00 00 00'
'00 00 00 00 00 00 FF 80 FF FF 80 FF FF 80 FF FF'
'80 FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF 80'
'FF FF 80 FF E4 EE FF CB D3 FF C9 D4 FF E1 F1 FF'
'FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF'
'80 FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF 80'
'FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF'
'FF 80 FF B9 C5 EF 77 82 BC 34 3D 86 20 25 80 23'
'25 89 20 26 87 1D 26 7D 2F 3B 81 73 7F B9 B1 B8'
'E9 E0 E7 FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF'
'FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF'
'80 FF DB E0 FF D0 D3 FF 70 70 C4 36 33 A0 1A 15'
'9A 1A 12 A5 1E 16 B0 0C 06 A1 0B 05 A0 1B 15 B0'
'16 0E A8 18 12 99 2E 30 8F 6C 71 B6 C1 C8 FF D7'
'E0 FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF 80'
'FF FF 80 FF FF 80 FF E2 E9 FF B6 BA ED 3A 3C 90'
'1E 18 95 03 00 97 13 05 BF 14 04 CD 1C 0C D6 18'
'0A D4 18 0A D4 1A 0B D8 14 01 D4 12 03 BF 02 00'
'88 18 1B 84 35 39 91 A7 AD F0 D7 DE FF FF 80 FF'
'FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF A9'
'AE DF 42 43 93 0B 08 7C 12 0A A5 30 21 E1 16 03'
'E2 18 04 F1 17 02 F1 17 04 F3 17 04 F3 15 02 F1'
'18 02 F4 15 04 E1 2E 25 D9 07 04 96 0B 0B 87 26'
'29 8B A5 AB EE D7 E0 FF FF 80 FF FF 80 FF FF 80'
'FF FF 80 FF D0 CE FF 30 2B 87 27 1F 9C 08 00 93'
'2B 26 C7 0A 06 B9 0F 08 D5 15 0A ED 09 00 F1 0C'
'00 FA 0D 00 FA 0B 00 EC 16 11 E2 0F 0E D0 0D 08'
'C9 23 1C D1 0B 09 A3 10 10 8C 2A 2E 86 B7 BE F5'
'FF 80 FF FF 80 FF FF 80 FF FF 80 FF 67 5B BF 1D'
'04 A2 0E 00 B0 2C 1F CF 15 1E A4 20 33 AC 86 99'
'FF 3F 4A F8 00 00 DF 0F 04 FF 10 07 FE 00 06 CF'
'3F 61 D2 85 A7 FF 1D 20 D9 17 0C DE 2A 23 D8 09'
'06 98 0D 10 79 57 5C A1 D4 DB FF FF 80 FF FF 80'
'FF A8 B5 CF 25 16 96 18 00 BC 14 00 CF 13 09 C7'
'29 3A B2 AC C9 FF CC EA FF A1 B5 FF 43 41 EE 19'
'0C D4 18 0E D3 45 4C DF A3 CB FF C8 F5 FF 96 A7'
'FF 27 27 E5 07 01 BE 23 1B C6 06 02 8A 28 27 87'
'9A 9E D1 FF 80 FF FF 80 FF 71 79 B4 16 0F 9A 08'
'00 B8 03 00 CA 13 15 CD 93 A8 FF D3 EE FF DE F4'
'FF E6 F2 FF D8 CE FF 5D 49 AA 5D 48 AE D6 D0 FF'
'E8 F9 FF DC FB FF CA ED FF 88 A0 FF 11 14 C3 0E'
'02 C6 1B 0D BF 14 0D 93 53 5A 99 FF 80 FF FF 80'
'FF 21 27 6E 04 01 8D 12 0C C5 0D 0A DB 06 09 C9'
'3F 4D D5 B6 C8 FF E3 F0 FF EC F0 FF FF F7 FF F5'
'E5 FF F5 E3 FF FD F4 FF EC F2 FF E2 F6 FF AE CF'
'FF 3F 59 D5 12 11 CD 09 00 CE 11 00 C3 10 06 98'
'1B 22 67 FF 80 FF FF 80 FF 25 2D 70 1E 1F 9F 06'
'03 B3 00 00 C6 08 03 DA 10 0F C3 3E 3F C5 D1 D4'
'FF F4 F4 FF F9 F5 FF FF FE FF FF FC FF F6 F5 FF'
'F3 F9 FF D0 D9 FF 4A 54 E1 00 00 BA 01 00 D6 06'
'00 D2 12 04 BD 18 13 98 17 20 60 FF 80 FF FF 80'
'FF 1D 23 6C 03 02 82 14 0E BF 05 00 D7 00 00 D5'
'13 06 D6 1B 13 BA 53 4E B7 DF DC FF FB FB FF FA'
'FB F7 F8 FA FA F8 FB FF E0 E5 FF 53 54 AE 15 12'
'C5 00 00 DB 05 00 E5 10 00 DD 12 07 B7 0C 0A 85'
'21 2A 6A FF 80 FF FF 80 FF 1F 1D 77 05 00 8A 17'
'0A C4 09 00 DB 00 00 D9 15 04 DE 1C 0F C5 51 47'
'C3 DD D9 FF F8 F6 FF F8 F8 FF F7 F7 FF F4 F7 FF'
'DF E0 FF 4F 4E B4 12 10 C8 00 00 DD 07 00 E4 0F'
'00 D8 10 07 B1 0C 0C 82 21 2A 69 FF 80 FF FF 80'
'FF 29 25 7E 23 19 A2 0D 00 B0 00 00 BF 11 04 D6'
'17 0F C8 42 3E D3 CB CA FF EC EC FF F3 F3 FF F6'
'F7 FF F4 F6 FF F2 F4 FF ED F2 FF CA D0 FF 48 4F'
'E4 00 00 BF 07 00 D3 05 00 C3 0B 04 A8 17 16 8A'
'18 22 5E FF 80 FF FF 80 FF 26 27 6B 0A 04 79 1B'
'13 A6 1A 15 B8 12 16 AB 4C 5A C4 BE D2 FF DE F2'
'FF E5 F5 FF EF F4 FF D8 D8 FF D7 D7 FF EF F4 FF'
'E7 F5 FF DB F2 FF AA CB FF 4A 64 DA 1C 23 C6 07'
'01 B2 08 01 9E 10 0C 83 1F 27 62 FF 80 FF FF 80'
'FF 76 79 B0 1B 15 82 10 06 8F 11 0C 9D 21 29 A2'
'A3 BA FE DA F8 FF E1 FD FF E6 F9 FF D0 D1 FF 41'
'3B 8A 41 39 8C CF CD FF EA F8 FF E1 FC FF CF F9'
'FF 96 BB FF 20 2D B1 0D 0B A5 13 0C 9D 15 12 80'
'5A 60 95 FF 80 FF FF 80 FF B6 B5 ED 28 19 8C 1B'
'08 9B 04 00 8D 48 44 C5 38 49 92 BA D3 FD DF F8'
'FF CC D8 FF 42 3A 9F 28 14 95 29 11 97 41 33 A3'
'CE CF FF DE F2 FF AC D2 F5 34 58 94 38 46 B7 06'
'07 8D 17 13 90 1D 1C 7A 95 9B C8 FF 80 FF FF 80'
'FF FF 80 FF 5F 51 AF 23 0E 92 1C 0A 99 38 2F AE'
'54 5B B0 56 66 A1 A4 B3 EB 45 4C 95 1D 14 88 2C'
'17 A2 2C 15 A5 1F 0E 8D 47 43 9C A3 AC F0 59 6F'
'B1 4F 66 B6 34 3A AB 00 00 75 16 14 78 47 46 8E'
'FF 80 FF FF 80 FF FF 80 FF FF 80 FF D9 D4 FF 31'
'22 7D 2A 17 8E 14 05 7F 60 5C C2 72 74 CC 74 7B'
'CA 50 57 A7 61 60 C2 45 3E AD 47 3C B0 66 5A CA'
'56 50 AF 76 73 D6 70 6D E8 5A 55 DA 16 0F 8E 11'
'0B 76 1F 1F 65 C8 CC F5 FF 80 FF FF 80 FF FF 80'
'FF FF 80 FF FF 80 FF B6 AC E8 35 23 81 20 0C 7D'
'22 12 87 7F 76 E5 93 91 F5 AA AD FF A0 A4 FD 97'
'98 F2 98 97 F5 A7 9F FF B4 A9 FF 99 8A FF 7D 6A'
'FD 1A 07 9C 13 05 82 33 2C 87 9A 9D CA FF 80 FF'
'FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF'
'80 FF C3 B3 FA 3C 28 89 2D 16 90 08 00 75 52 48'
'C0 92 91 F9 9D A2 F7 B8 C0 FF BB BF FF A5 A0 FC'
'9E 8E FE 5B 45 C6 16 00 8A 25 0E 92 26 17 7F C0'
'B8 FE FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF 80'
'FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF D0 C4 FE'
'81 6F CC 2E 1F 8B 13 0B 76 1A 1C 7A 35 42 86 3E'
'4D 85 41 4C 86 3D 3E 88 25 19 7D 1B 09 74 39 2B'
'89 70 64 B6 C9 BE FF FF 80 FF FF 80 FF FF 80 FF'
'FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF'
'80 FF FF 80 FF FF 80 FF FF 80 FF C4 C7 FA 85 8C'
'CB 25 33 6E 1B 31 5A 1C 36 54 20 34 53 23 2F 59'
'2E 2C 6E 8D 8A C2 C2 C9 D8 FF 80 FF FF 80 FF FF'
'80 FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF 80'
'FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF'
'FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF'
'80 FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF 80'
'FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF FF 80 FF'
'FF 80 FF FF 80 FF'
}
TEST BITMAP
{
'42 4D 12 04 00 00 00 00 00 00 36 00 00 00 28 00'
'00 00 11 00 00 00 13 00 00 00 01 00 18 00 00 00'
'00 00 DC 03 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 00 00 00 00 FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF'
'FF FF FF FF FF FF FF FF FF 00 FF FF FF F1 C6 B7'
'F1 C6 B7 F2 C9 B8 F3 C9 B9 F3 C9 B9 F3 C9 B9 F3'
'C9 B9 F2 C9 B8 F5 C8 B3 F5 C8 B3 F5 C8 B3 F4 C8'
'B2 F2 C5 B0 FF FF FF FF FF FF FF FF FF 00 F4 C1'
'AB F9 CB B7 F9 CB B7 FB CE B9 FA CE BC FA CE BC'
'FA CE BC FA CE BC FB CF B9 FB CD B6 FB CD B2 FB'
'CD B2 FA CB B1 F7 C8 AE F2 C5 B0 FF FF FF FF FF'
'FF 00 F6 C3 AD FC CD BA FC CD BA FC D0 BE FB D2'
'C1 FC D0 BE FC D0 BE FC D0 BE FB D3 BD FC D3 B7'
'FB D1 B6 FB D1 B6 FB CF B2 F9 C9 AD F3 C6 B1 FF'
'FF FF FF FF FF 00 F6 C3 AD FC CD BA FC CD BA FC'
'D0 BE FB D2 C1 FC D0 BE FC D0 BE FC D0 BE FB D3'
'BD FC D3 B7 FB D1 B6 FB D1 B6 FB CF B2 F9 C9 AD'
'F3 C6 B1 FF FF FF FF FF FF 00 F6 C3 AD FC D0 BE'
'FC D0 BE FC D3 C2 FC D3 C2 FC D5 C2 FC D5 C2 FC'
'D5 C2 FC D5 C2 FC D4 BA FC D3 B7 FC D3 B7 FC D1'
'B3 FA CB AF F4 C8 B2 FF FF FF FF FF FF 00 F6 C3'
'AD FC D0 BE FC D0 BE FC D3 C2 FC D3 C2 FC D5 C2'
'FC D5 C2 FC D5 C2 FC D5 C2 FC D4 BA FC D3 B7 FC'
'D3 B7 FC D1 B3 FA CB AF F4 C8 B2 FF FF FF FF FF'
'FF 00 F6 C7 B1 FC D3 C2 FC D3 C2 FC D6 C5 FC D6'
'C5 FC D6 C5 FC D6 C5 FD D5 C3 00 00 00 FC D4 BA'
'FB CF B2 FB CF B2 FB CF B2 FA CB B1 F5 C8 B3 FF'
'FF FF FF FF FF 00 F6 C8 B4 FC D5 C5 FC D5 C5 FC'
'D5 C5 FC D5 C5 FC D5 C5 FC D5 C5 00 00 00 00 00'
'00 00 00 00 FB D3 BD FB D3 BD FB CE B6 FA CD B5'
'F3 C9 B5 FF FF FF FF FF FF 00 F5 CA B7 FB D6 C8'
'FB D6 C8 FB D6 C8 FB D6 C8 FB D3 C1 00 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 FB CE B6 FB CE'
'B6 FB CD B6 F3 CB B9 FF FF FF FF FF FF 00 F6 CB'
'B8 FC D8 C9 FC D8 C9 FD D8 CA FD D8 CA 00 00 00'
'00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00'
'00 00 FB CE B6 FB CD B9 F4 CC BA FF FF FF FF FF'
'FF 00 F6 CB B8 FC D8 C9 FC D8 C9 FD D8 CA FC DB'
'CD FC DB CD FC DB CD FC DB CD FB D6 C8 FB CD B9'
'FB CD B9 FB CD B9 FB CD B9 FB CD B9 F4 CC BA FF'
'FF FF FF FF FF 00 F7 CE BD FC DB CD FC DB CD FC'
'DB CD FC DB CD FC DB CD FC DB CD FC DB CD FB D6'
'C8 FB CD B9 FB CD B9 FB CD B9 FB CD B9 FB CD B9'
'F3 CC BC FF FF FF FF FF FF 00 F8 D0 BF FC DD D0'
'FC DD D0 FD DD CE FD D9 CA FB D6 C8 FB D6 C8 FB'
'D6 C8 FB D6 C8 FD CE BB FC CD BA FC CD BA FB CD'
'B9 FC CD BA F3 CC BC FF FF FF FF FF FF 00 F7 D3'
'C4 FC E1 D4 FC E1 D4 FD E0 D1 FC DB CD FC D8 C9'
'FC D8 C9 FC D8 C9 FB D5 C8 FC D0 BE FD CE BB FD'
'CE BB FD CE BB FA CE BC F3 CC BC FF FF FF FF FF'
'FF 00 F7 D3 C4 FC E1 D4 FC E1 D4 FD E0 D1 FC DB'
'CD FC D8 C9 FC D8 C9 FC D8 C9 FB D5 C8 FC D0 BE'
'FD CE BB FD CE BB FD CE BB FA CE BC F3 CC BC FF'
'FF FF FF FF FF 00 F9 D8 CA FE E6 DA FE E6 DA FC'
'E3 D8 FD DE D1 FD DB CE FD DB CE FD D9 CA FC D8'
'C9 FC D5 C5 FC D3 C5 FC D3 C5 FC D3 C2 FA CE BC'
'F4 CC BA FF FF FF FF FF FF 00 FD E0 D1 FE EA E1'
'FE EA E1 FE E6 DA FC E1 D4 FD E0 D1 FD E0 D1 FC'
'DD D0 FD DB CE FD D9 CA FB D8 C8 FB D8 C8 FC D6'
'C5 FA CE BC F3 C9 B9 FF FF FF FF FF FF 00 FF FF'
'FF FD E0 D1 FD E0 D1 F9 D8 CA F7 D3 C4 F8 D0 BF'
'F8 D0 BF F7 CE BD F4 CC BA F6 CB B8 F5 CA B7 F5'
'CA B7 F7 C8 B5 F4 C5 AF FF FF FF FF FF FF FF FF'
'FF 00'
}
TEST DIALOG 218, 62, 225, 215
STYLE DS_ABSALIGN | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Sans Serif"
{
CONTROL "TBtnBmp", 101, "TBtnBmp", WS_CHILD | WS_VISIBLE, 80, 20, 65, 30
CONTROL "TBtnBmp", 301, "TBtnBmp", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 30, 103, 80, 30
CONTROL "TBtnBmp", 302, "TBtnBmp", WS_CHILD | WS_VISIBLE | WS_TABSTOP, 114, 103, 80, 30
PUSHBUTTON "Button", 201, 30, 148, 80, 30
PUSHBUTTON "Button", 202, 114, 148, 80, 30
}
Regards, saludos.
Re: ButtonBmp does not work popup menus
Posted: Sat Nov 09, 2024 4:25 pm
by Giovany Vecchi
João, é ButtonBmp e não BtnBmp
John, it's ButtonBmp and not BtnBmp
Re: ButtonBmp does not work popup menus
Posted: Sat Nov 09, 2024 9:31 pm
by karinha
Giovany Vecchi wrote:João, é ButtonBmp e não BtnBmp
John, it's ButtonBmp and not BtnBmp
My dear,
Code: Select all | Expand
// NO FUNCIONA CON MENU
REDEFINE BUTTONBMP oBtnBmp ID 202 OF oDlg ;
PROMPT "BUTTONBMP" RESOURCE "ACEPTAR" TEXTRIGHT
oBtnBmp:oPopUp := {| oBtnBmp | BuildPopup() } // NO FUNCIONA. _. NÃO FUNCIONA!! NO WORK!
Regards, saludos.
Re: ButtonBmp does not work popup menus
Posted: Sun Nov 10, 2024 5:11 am
by nageswaragunupudi
How do I put a pop up menu on a button of the TButtonBmp class?
Only TBtnBmp supports oPopupMenu natively in addition to bAction.
TButtonBmp or its parent class TButton, do not natively support oPoupMenus.
In the case of these buttons, we can use ACTION clause to show popup menus.
This is a small sample:
Code: Select all | Expand
#include "fivewin.ch"
function Main()
local oDlg, oBtn
DEFINE DIALOG oDlg SIZE 400,400 PIXEL TRUEPIXEL
@ 40,40 BUTTONBMP oBtn PROMPT "PopUp" SIZE 140,60 PIXEL OF oDlg ;
ACTION PopupMenu():Activate( oBtn:nTop + oBtn:nHeight, oBtn:nLeft, oDlg )
ACTIVATE DIALOG oDlg CENTERED
return nil
function PopupMenu()
local oPopup
MENU oPopup POPUP 2007
MENUITEM "Jamuary"
MENUITEM "February"
MENUITEM "March"
ENDMENU
return oPopup
Re: ButtonBmp does not work popup menus
Posted: Sun Nov 10, 2024 12:47 pm
by Giovany Vecchi
nageswaragunupudi wrote:How do I put a pop up menu on a button of the TButtonBmp class?
Only TBtnBmp supports oPopupMenu natively in addition to bAction.
TButtonBmp or its parent class TButton, do not natively support oPoupMenus.
In the case of these buttons, we can use ACTION clause to show popup menus.
This is a small sample:
Code: Select all | Expand
#include "fivewin.ch"
function Main()
local oDlg, oBtn
DEFINE DIALOG oDlg SIZE 400,400 PIXEL TRUEPIXEL
@ 40,40 BUTTONBMP oBtn PROMPT "PopUp" SIZE 140,60 PIXEL OF oDlg ;
ACTION PopupMenu():Activate( oBtn:nTop + oBtn:nHeight, oBtn:nLeft, oDlg )
ACTIVATE DIALOG oDlg CENTERED
return nil
function PopupMenu()
local oPopup
MENU oPopup POPUP 2007
MENUITEM "Jamuary"
MENUITEM "February"
MENUITEM "March"
ENDMENU
return oPopup
Hi Mr. Rao. This is how I already do it and use it.
I would like to show a down arrow like on the ButtonBar buttons.
Code: Select all | Expand
Redefine ButtonBmp lc_oBtn551_RequerimentoMat ;
Id 551 Of lc_oDlgProtAtivos BitMap Res_BmpName("PRINTER");
Prompt "Requerimentos" ;
CANCEL ;
TEXTRIGHT ;
ToolTip "Menu de opções para materialização dos requerimentos"
lc_oBtn551_RequerimentoMat:bAction := <|oSelfObj|
Local _oMenuRequerimentosMat
Local _lTmp := .F.
Local _aMenuItem := Array(3)
MENU _oMenuRequerimentosMat POPUP 2015
MENUITEM _aMenuItem[1] Prompt "Imprimir Requerimentos (Pré Visualização)" OF _oMenuRequerimentosMat
_aMenuItem[1]:bAction := <||
? "BLA BLA BLA 1"
Return Nil
> //cEnd
MENUITEM _aMenuItem[2] Prompt "Imprimir Requerimento (Arquivo PDF)" OF _oMenuRequerimentosMat
_aMenuItem[2]:bAction := <||
? "BLA BLA BLA 2"
Return Nil
> //cEnd
MENUITEM _aMenuItem[3] Prompt "Gerar Requerimento assinado digitalmente e enviar via WhatsApp" OF _oMenuRequerimentosMat
_aMenuItem[3]:bAction := <||
? "BLA BLA BLA 3"
Return Nil
> //cEnd
ENDMENU
ACTIVATE POPUP _oMenuRequerimentosMat AT oSelfObj:nHeight , 1 of oSelfObj
Return Nil
> //cEnd