Error on create a baction on a bitmap

Error on create a baction on a bitmap

Postby Silvio » Wed Sep 30, 2009 5:01 pm

I made a simply function to showa bitmap on a wnd and move it
Function crea_oggetto(nItem, nRow,nCol)
Local oSprite
Local cBitmap:=""
DO CASE
CASE nItem = 1
cBitmap=".\bar\BAR1.bmp"
..
endcase
@ nRow, nCol BITMAP oSprite;
FILENAME cBitmap;
PIXEL NOBORDER of oWnd

oSprite:lTransparent = .T.

oSprite:Move(oSprite:nTop,;
oSprite:nLeft,;
oSprite:nWidth(),;
oSprite:nHeight())

oSprite:lDrag := .T.
oSprite:bMoved := {|| oSprite:CoorsUpdate() ,;
nBmpRow := oSprite:nTop ,;
nBmpCol := oSprite:nLeft ;
}

oSprite:bAction := {|oSprite| Menu_azioni(oSprite) }


return nil



FUNC Menu_azioni(oSprite)
local oMenu
MENU oMenu POPUP 2007
MENUITEM
ENDMENU

ACTIVATE POPUP oMenu OF oDlg AT nRow, nCol

RETURN( NIL )

return nil



why it make error on baction ?
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: Error on create a baction on a bitmap

Postby Daniel Garcia-Gil » Wed Sep 30, 2009 9:05 pm

Silvio...

Silvio wrote:....

@ nRow, nCol BITMAP oSprite;
FILENAME cBitmap;
PIXEL NOBORDER of oWnd
....
oSprite:bAction := {|oSprite| Menu_azioni(oSprite) }
....
why it make error on baction ?


because TBITMAP Class no exist bAction data

try with bLClicked
User avatar
Daniel Garcia-Gil
 
Posts: 2365
Joined: Wed Nov 02, 2005 11:46 pm
Location: Isla de Margarita

Re: Error on create a baction on a bitmap

Postby Silvio » Thu Oct 01, 2009 8:11 am

ooopss
Best Regards, Saludos

Falconi Silvio
User avatar
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 37 guests