FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Picture and text in one column
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Picture and text in one column
Posted: Thu Jan 10, 2019 08:24 AM

Hi !

Is it possible to simultaneously display in one column xbrowsa the picture and the text ?

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Picture and text in one column
Posted: Thu Jan 10, 2019 02:18 PM
Configure picture in one column and text in the next column and then use oColPic:SetColsAsRows( { n, n+ 1 } )

Sample:
Code (fw): Select all Collapse
function XbrImageAndText()

   local cPath    := "c:\fwh\bitmaps\pngs\"
   local aDir     := DIRECTORY( cPath + "*.png" )

   AEval( aDir, { |a| a[ 1 ] := cPath + a[ 1 ], a[ 2 ] := cFileNoExt( a[ 1 ] ) } )

   XBROWSER aDir COLUMNS { 1, 1, 2 } SETUP ( ;
      oBrw:nMarqueeStyle            := 2, ;
      oBrw:aCols[ 2 ]:cDataType     := "F", ;
      oBrw:aCols[ 2 ]:nDataBmpAlign := AL_CENTER, ;
      oBrw:aCols[ 3 ]:nDataStrAlign := AL_CENTER, ;
      oBrw:aCols[ 3 ]:bClrStd       := { || { CLR_WHITE, CLR_GREEN } }, ;
      oBrw:aCols[ 2 ]:SetColsAsRows( { 2, 3 } ) ;
      )

return nil


Regards



G. N. Rao.

Hyderabad, India
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Picture and text in one column
Posted: Thu Jan 10, 2019 08:22 PM

Thanks, Mr.Rao !

Continue the discussion