To define a area, I want to keep the SAY visible on top in DESIGN-mode
but < BringWindowToTop > doesn't help.
Moving the SAY, it is shown behind all other objects.
I can crop anything from the dialog with resize and image-format-export
a right mouseclick inside the dialog creates a transparent SAY in DESIGN-mode
A short test without image ( NO extras needed )
Right mouseclick. Next move the say to the browser-area.
- Code: Select all Expand view RUN
#include "fivewin.ch"
#include "xbrowse.ch"
STATIC oDlg, nClicked := 0, oCSay
STATIC oFont1, oFont2
FUNCTION MAIN()
LOCAL oBrw, aArray := {}, oGet, cGet := " ", oSay1
DEFINE FONT oFont1 NAME "Tahoma" SIZE 0, -16 BOLD
DEFINE FONT oFont2 NAME "Tahoma" SIZE 0, -12 BOLD
IF EMPTY( aArray )
aArray := {{"one","two","three","four"},;
{"one","two","three","four"},;
{"one","two","three","four"},;
{"one","two","three","four"}}
ENDIF
DEFINE DIALOG oDlg TITLE "Crop-Sample" SIZE 700, 600 TRUEPIXEL
@ 50, 50 XBROWSE oBrw SIZE 320, 200 OF oDlg ;
COLUMNS {1,2,3,4} ;
HEADERS {"Btn Trans - 1","Btn Trans - 2","Header - 3","Header - 4"} ;
ARRAY aArray LINES CELL PIXEL
oBrw:nRowHeight := 25
oBrw:bClrStd := {|| {CLR_BLACK, CLR_CYAN } }
oBrw:CREATEFROMCODE()
@ 300, 100 SAY "Text..:" SIZE 100, 20 OF oDlg COLOR 0, 255 FONT oFont2 PIXEL
@ 300, 250 GET oGet VAR cGET OF oDlg SIZE 100, 20 COLOR "W/G" PICTURE "@K" PIXEL
oDlg:bRClicked := {| nRow, nCol | nClicked++, IIF( nClicked = 1, ;
MAKE_AREA( nRow, nCol ), MSG_AREA() ) }
ACTIVATE DIALOG oDlg
oFont1:End()
oFont2:End()
RETURN NIL
//----------------------------
FUNCTION MAKE_AREA( nRow, nCol )
//New( nRow, nCol, bText, oWnd, cPicture, oFont,;
// lCentered, lRight, lBorder, lPixels, nClrText, nClrBack,;
// nWidth, nHeight, lDesign, lUpdate, lShaded, lBox, lRaised,;
// lAdjust, cVarName, lUnicode, lVCenter ) CONSTRUCTOR
oCSay := TSAY():New( nRow, nCol, NIL, oDlg, NIL, NIL,;
NIL, NIL, .T., .T., NIL, NIL,;
150, 150, .T., .T., .T. )
oCSay:lTransparent := .T.
oCSay:bGet := nil
oCSay:lWantClick := .T.
BringWindowToTop( oCSay:hWnd )
oCSay:SetFocus()
RETURN( NIL )
//------------------------------
FUNCTION MSG_AREA()
aRect := GETCLIENTRECT( oCSay:hWnd )
nTop := oCSay:nTop
nLeft := oCSay:nLeft
nBottom := aRect[3]
nRight := aRect[4]
oCSay:SetFocus()
MsgAlert( "Top : " + STR(nTop) + CRLF + "Left : " + STR(nLeft) + CRLF + "Height : " + ;
STR(nBottom) + CRLF + "Width : " + STR(nRight), "Selected area" )
RETURN NIL
any idea ?
regards
Uwe