What about adding the number to the cargo.
aBtn[n]:cargo := n
bAction := {|oBtn| menupopup( oBtn ) }
n := 1
for ?????
@ Fila,(Col+nPassLarg) SBUTTON aBtn[n] RESOURCE "omb3" PIXEL;
OF oWnd ;
FONT oFont2 ;
CAPTION cCaption ;
COLOR CLR_WHITE, GetSysColor(15) ;
TEXT ON_CENTER ;
NOBOX ;
TOOLTIP oemtoansi(cCaption) ;
ACTION bAction
aBtn[n]:cargo := n // add this cargo
n++
next ????
function MEnupopup( oBtn )
Local oMenu, aRect ,nRow,nCol
cpoltrona:= Val( oBtn:cCaption )
? 'Popup for button # '+ltrim(str( oBtn:cargo ))
aRect := GetClientRect( oBtn:hWnd )
MENU oMenu POPUP
MENUITEM "&Nuova prenotazione" action OCCUPARE(oBtn,.t.)
MENUITEM "&Modifica prenotazione" action OCCUPARE(oBtn,.f.)
MENUITEM "&Mostra prenotazione"
ENDMENU
ACTIVATE POPUP oMenu AT aRect[ 3 ] + 1, aRect[ 2 ] OF oBtn
RETURN NIL
? 'Popup for button # '+ltrim(str( oBtn:cargo ))
Silvio wrote:Dear Timm, have you correct the error ?
Best Regards,
C_OUTPUTFOLDER =
DEFFILE =
INCLUDEFOLDERS = \fwh\include;include
LDEBUG = .F.
LGUI = .F.
LIBFOLDERS =
LMT = .F.
LUSEDLL = .F.
MAPFILE =
MYC_FLAGS =
MYDEFINES = __HARBOUR__ ;__FLAT__
MYLINK_FLAGS =
MYPRG_FLAGS =
MYRC_FLAGS =
MYSLY_FLAGS =
OUTPUTFOLDER = xbp\obj
PRG_OUTPUTFOLDER =
RC_OUTPUTFOLDER =
SLY_OUTPUTFOLDER =
TARGETFOLDER = xbp\lib
[source\classes\TSBUTTON.PRG]
MYC_FLAGS =
MYDEFINES =
MYPRG_FLAGS =
[source\classes\TSBAR.PRG]
MYC_FLAGS =
MYDEFINES =
MYPRG_FLAGS =
[source\classes\TSLINES.PRG]
MYC_FLAGS =
MYDEFINES =
MYPRG_FLAGS =
[source\classes\TSTSAY.PRG]
MYC_FLAGS =
MYDEFINES =
MYPRG_FLAGS =
[source\function\BPAINT.C]
MYC_FLAGS =
MYDEFINES =
Silvio wrote:How I can make to insert on each button the caption with the number of buttons ?
Regards
@10,90 SBGROUP aBtn1 OF aChild[ 3 ] ;
CAPTION aCapt1 ;
SIZE 34, 34 PIXELS ;
FONT oFont ;
ACTION aAct1 ; // RESOURCE "Seatm", "Seatm", "Seatm", "Seatm" ; // multi bitmap
RESOURCE "Seatm1", "Seatm2", "Seatm3", "Seatm4" ; // MODIFIED BY EVANS
MESSAGE "Click izquierdo: Reservar Asientos. " + ;
"Click derecho: Cancelar Reservaci≤n." ;
COLORS CLR_WHITE, CLR_CYAN ;
TEXT ON_CENTER ;
LOOK W97
SEATM BITMAP "..\bitmaps\SEATM.BMP"
SEATM1 BITMAP "..\bitmaps\SEATM1.BMP"
SEATM2 BITMAP "..\bitmaps\SEATM2.BMP"
SEATM3 BITMAP "..\bitmaps\SEATM3.BMP"
SEATM4 BITMAP "..\bitmaps\SEATM4.BMP"
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 88 guests