How to show a DELETED-effect on Xbrowse-images ?

How to show a DELETED-effect on Xbrowse-images ?

Postby ukoenig » Tue Mar 11, 2014 1:40 pm

Hello,

is it possible, to get a DELETE-effect on normal displayed images ?

normal rows. the records are NOT deleted.

Image

Records deleted
a visual effect is only shown ( NON alphablended ), using my function. The title-textcolor is changed to RED
Possible, to get a effect on NORMAL image-display ( Image 1 ), if a record is deleted ?

Image

using alphablended-images, I reduced only the transparent-level as a DELETE-effect.
Still needed a effect using NON alpablended images like JPG


Image

Code: Select all  Expand view

// Image 1
oCol := oBrw:AddCol()
oBrw:aCols[ 1 ]:cHeader := "Image 1"
oBrw:aCols[ 1 ]:nHeadStrAlign := AL_CENTER
oBrw:aCols[ 1 ]:nWidth := 120
oBrw:aCols[ 1 ]:nEditType := TYPE_IMAGE
oBrw:aCols[ 1 ]:lBmpStretch := .F.
oBrw:aCols[ 1 ]:bStrImage := {|| ("CUST")->Image1 }
oBrw:aCols[ 1 ]:nDataBmpAlign  := AL_CENTER
oBrw:aCols[ 1 ]:bAlphaLevel := { || IF( ( oBrw:cAlias )->( Deleted() ) , 60, ) }
oBrw:aCols[ 1 ]:bPopUp := { |o| ColMenu( o, oBrw ) }
oBrw:aCols[ 1 ]:bToolTip := {| oBrw, nRow, nCol, nKeyFlag | ;
   IF( oBrw:MouseRowPos(nRow) == oBrw:nRowSel, ;
      "Image select" + CRLF + ;
      "with RIGHT" + CRLF + ;
      "mouseclick", ) }

// Image 2

oCol := oBrw:AddCol()
oBrw:aCols[ 2 ]:cHeader := "Image 2"
oBrw:aCols[ 2 ]:nHeadStrAlign := AL_CENTER
oBrw:aCols[ 2 ]:nWidth := 120
oBrw:aCols[ 2 ]:lAllowSizing := .F.
oBrw:aCols[ 2 ]:bPaintText := { | oCol, hDC, cData, aRect | ;
            DRAWCELL( oBrw, oCol, hDC, ("CUST")->IMAGE2, aRect, oFont3 ) }
oBrw:aCols[ 2 ]:bToolTip := {| oBrw, nRow, nCol, nKeyFlag | ;
      IF( oBrw:MouseRowPos(nRow) == oBrw:nRowSel, ;
         "Image select" + CRLF + ;
         "with RIGHT" + CRLF + ;
         "mouseclick", ) }
 

// in DRAWCELL

IF lAlpha
      IF ( oBrw:cAlias )->( Deleted() )
            ABPaint( hDC, nBmpLeft, nBmpTop, hBmp, oCol:nAlphaLevel(60) )
      ELSE
            ABPaint( hDC, nBmpLeft, nBmpTop, hBmp, oCol:nAlphaLevel(255) )
      ENDIF
ELSEIF
...
...
 


Best regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: How to show a DELETED-effect on Xbrowse-images ?

Postby nageswaragunupudi » Thu Mar 13, 2014 8:23 am

Code: Select all  Expand view
oBrw:aCols[ 1 ]:bAlphaLevel := { || IF( ( oBrw:cAlias )->( Deleted() ) , 60, 255 ) }
 

This should be enough and you do not need bPaintText and DrawCell() function.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: How to show a DELETED-effect on Xbrowse-images ?

Postby ukoenig » Sat Mar 15, 2014 11:12 am

Mr. Rao,

that will not work on JPG's

Another idea :
maybe to make it possible, to load a image with BLUR-effect for DELETED ?
That would work on JPG and alpha-images.

NORMAL display

Image

BLUR on deleted JPG and alphablended image

Image

Best regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: How to show a DELETED-effect on Xbrowse-images ?

Postby nageswaragunupudi » Sat Mar 15, 2014 1:46 pm

Ofcourse, alphalevel does not work with jpgs and non-alpha bitmaps.
The point i was making was that, where alphalevel works, we do not need to use bPaintText
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 66 guests