FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to show a DELETED-effect on Xbrowse-images ?
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
How to show a DELETED-effect on Xbrowse-images ?
Posted: Tue Mar 11, 2014 01:40 PM
Hello,

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

normal rows. the records are NOT deleted.



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 ?



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




Code (fw): Select all Collapse
// 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.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: How to show a DELETED-effect on Xbrowse-images ?
Posted: Thu Mar 13, 2014 08:23 AM
Code (fw): Select all Collapse
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
Posts: 4043
Joined: Wed Dec 19, 2007 06:40 PM
Re: How to show a DELETED-effect on Xbrowse-images ?
Posted: 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



BLUR on deleted JPG and alphablended 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.
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: How to show a DELETED-effect on Xbrowse-images ?
Posted: Sat Mar 15, 2014 01: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

Continue the discussion