xBrowse from resource, how to select Alpha-Bld.-BMP ?

xBrowse from resource, how to select Alpha-Bld.-BMP ?

Postby ukoenig » Wed Sep 16, 2009 10:23 am

Hello,

I use a Xbrowser from Resources to select Bmp's.
All Types of BMP's I can select, but not Alpa-Blended. Choosing a Alpha-BMP, I get a Error.
From this Line :
oLbx70:aCols[ 2 ]:bAlphaLevel := { | o | o:oLbx70:aRow[ 3 ] }
The same defined in Sample : xbalpha.prg ( from Source )
oBrw:aCols[ 1 ]:bAlphaLevel := { | o | o:oBrw:aRow[ 3 ] }

Deleting the Line < bAlphaLevel >, it works.

From Source it works : /samples/xbalpha.prg
Image

Working with Resources :
Image

Code: Select all  Expand view

...
oLbx70 := TXBrowse():New( oFld:aDialogs[3] )
REDEFINE XBROWSE oLbx70 ID 260  ;
HEADERS "Size", "Bmp","File" ;
OF oFld:aDialogs[3] ;
ARRAY aPICTURES AUTOCOLS FASTEDIT

oLbx70:nMarqueeStyle := MARQSTYLE_HIGHLROW
oLbx70:nColDividerStyle := LINESTYLE_BLACK
oLbx70:nRowDividerStyle := LINESTYLE_BLACK

oLbx70:bClrSelFocus = { || { 0, 16777215 } }
oLbx70:bClrSel = { || { 0, 10853885 } }
oLbx70:nRecSelColor = 15512898

oLbx70:lHScroll := .F.
oLbx70:lVScroll := .T.
oLbx70:lFooter := .T.
oLbx70:nRowHeight := 35
oLbx70:nFooterHeight := 7

oLbx70:SetBackGround( oBrush1 )

oLbx70:aCols[ 2 ]:nWidth := 50
oLbx70:aCols[ 2 ]:nEditType := TYPE_IMAGE
oLbx70:aCols[ 2 ]:lBmpStretch := .f.
oLbx70:aCols[ 2 ]:lBmpTransparent := .t.
oLbx70:aCols[ 2 ]:bStrImage := {|oCol, oLbx70| oLbx70:aRow[ 3 ] }
oLbx70:aCols[ 2 ]:nDataBmpAlign := AL_CENTER
oLbx70:aCols[ 2 ]:bPopUp := { | o | ColMenu( o ) }
oLbx70:aCols[ 2 ]:bAlphaLevel := { | o | o:oLbx70:aRow[ 3 ] }

oLbx70:aCols[ 3 ]:nWidth := 310
oLbx70:aCols[ 3 ]:nEditType := EDIT_BUTTON
oLbx70:aCols[ 3 ]:bEditBlock := {|nRow, nCol, oCol| oCol:Value := GET_BMP(oLbx70:nArrayAt)}
 
oLbx70:bLostFocus := { || CHANGE_BMP( oFld ) }
 


Application
===========
Path and name: E:\T_SKINS\btnskins.exe (32 bits)
Size: 2,054,656 bytes
Time from start: 0 hours 1 mins 45 secs
Error occurred at: 09/16/09, 12:13:05
Error description: Warning BASE/1004 Message not found: TXBRWCOLUMN:OLBX70
Args:

Stack Calls
===========
Called from: source\rtl\tobject.prg => TXBRWCOLUMN:ERROR(172)
Called from: source\rtl\tobject.prg => TXBRWCOLUMN:MSGNOTFOUND(205)
Called from: source\rtl\tobject.prg => TXBRWCOLUMN:OLBX70(0)
Called from: .\btnskins.PRG => (b)FOLDER_3(2085)
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:NALPHALEVEL(7535)
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:PAINTDATA(8455)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:PAINT(1325)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DISPLAY(982)
Called from: .\source\classes\CONTROL.PRG => TCONTROL:HANDLEEVENT(1422)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:HANDLEEVENT(9914)
Called from: .\source\classes\WINDOW.PRG => _FWH(3347)
Called from: => DIALOGBOXINDIRECT(0)
Called from: .\source\classes\DIALOG.PRG => TDIALOG:ACTIVATE(273)
Called from: .\source\function\ERRSYSW.PRG => ERRORDIALOG(343)
Called from: .\source\function\ERRSYSW.PRG => (b)ERRORSYS(27)
Called from: source\rtl\tobject.prg => TXBRWCOLUMN:ERROR(172)
Called from: source\rtl\tobject.prg => TXBRWCOLUMN:MSGNOTFOUND(205)
Called from: source\rtl\tobject.prg => TXBRWCOLUMN:OLBX70(0)
Called from: .\btnskins.PRG => (b)FOLDER_3(2085)
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:NALPHALEVEL(7535)
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:PAINTDATA(8455)
Called from: .\source\classes\XBROWSE.PRG => TXBROWSE:DRAWLINE(1491)
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:POSTEDIT(9548)
Called from: .\source\classes\XBROWSE.PRG => TXBRWCOLUMN:RUNBTNACTION(9464)
Called from: .\source\classes\XBROWSE.PRG => (b)TXBRWCOLUMN:CREATEBUTTONS(8973)
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:CLICK(447)
Called from: .\source\classes\BTNBMP.PRG => TBTNBMP:LBUTTONUP(657)

Best Regards
Uwe :lol:
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: xBrowse from resource, how to select Alpha-Bld.-BMP ?

Postby nageswaragunupudi » Thu Sep 17, 2009 2:52 pm

This is where your mistake is
Code: Select all  Expand view
{ | o | o:oLbx70:aRow[ 3 ] }


The column object does not have data oLbx70
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10625
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 78 guests