Page 1 of 1

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

Posted: Tue Mar 11, 2014 1:40 pm
by ukoenig
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


// 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 :?:

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

Posted: Thu Mar 13, 2014 8:23 am
by nageswaragunupudi

Code: Select all | Expand

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

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

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

Posted: Sat Mar 15, 2014 11:12 am
by ukoenig
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 :?:

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

Posted: Sat Mar 15, 2014 1:46 pm
by nageswaragunupudi
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