look this sample
- Code: Select all Expand view
static oWnd
Function test()
Local nItem,oRBar ,oGr3,oBtn2
DEFINE WINDOW oWnd TITLE "Sala " from 1,1 to 600,600 pixel
DEFINE RIBBONBAR oRBar WINDOW oWnd PROMPT "Configurazione sala" HEIGHT 160 TOPMARGIN 55
ADD GROUP oGr3 RIBBON oRBar TO OPTION 1 PROMPT "Pannelli" width 420
@ 2, 5 ADD BUTTON oBtn2 PROMPT "Orizontale" BITMAP ".\bitmaps\testsmall.BMP" GROUP oGr3 ROUND SIZE 50,75 ;
action (nItem :=1)
SET MESSAGE OF oWnd TO " Class RibbonBar" ;
CENTERED CLOCK KEYBOARD 2007
oWnd:bLClicked = { | nRow, nCol, nFlags | crea_oggetto(nItem, nRow,nCol) }
ACTIVATE WINDOW oWnd
oRBar:End()
return nil
Function crea_oggetto(nItem, nRow,nCol)
Local oSprite
Local cBitmap
DO CASE
CASE nItem = 1
cBitmap=".\bitmaps\test.bmp"
endcase
@ nRow, nCol BITMAP oSprite;
FILE 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 ;
}
return nil
test.bmp
with this test I can insert a bitmap on window and move it
But if I have two bitmaps (the same bitmaps ) and I must draw a line it is too hard to move them
as you can see on this picture
and when I click on each bitmaps I see a hand cursor and I see a big box
It can be hard to draw a line for a sample
How I can make to resolve it ?