FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour XBROWSE with "fullwidth" autocols
Posts: 179
Joined: Fri Dec 07, 2007 01:26 PM
XBROWSE with "fullwidth" autocols
Posted: Thu Feb 29, 2024 12:25 PM
Dear friends,

I am working with XBROWSE and I wonder - is it possible to make the cols adjust to the available width.
This is my code...I use AUTOCOLS. So please also allow me a second question. Is there a way to know how many cols are present in the specific XBROWSE?

Right now I have a gap and your help would be greatly appreciated.

Kind regards and thank you already in advance
Ruth


Code (fw): Select all Collapse
 REDEFINE XBROWSE oBrw2 ID 4009 ;
      HEADERS "", "gesendet", "Menge", "Sprache+Anrede" ;
      OF oDlg ;
      ARRAY aEmails AUTOCOLS 
      
  
      oBrw2:nRowHeight := 40
      
      oBrw2:aCols[2]:AddResource( "OKKLEIN" )
      oBrw2:aCols[2]:AddResource( "TXTMIN" )
      oBrw2:aCols[2]:bBmpData := { || iif( aEmails[oBrw2:nArrayAt][2] = 1, 1, 2 ) }
      oBrw2:aCols[2]:bStrData := { || "" }
      oBrw2:aCols[1]:lHide    := .t.
    oBrw2:nColDividerStyle    := ;
        oBrw2:nRowDividerStyle := LINESTYLE_LIGHTGRAY
        oBrw2:nMarqueeStyle := MARQSTYLE_SOLIDCELL
        oBrw2:lDrawBorder := .t.
        oBrw2:nDataStrAligns := AL_CENTER
    
        oBrw2:bClrSel = { || { 7105644,10801663 } }
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: XBROWSE with "fullwidth" autocols
Posted: Thu Feb 29, 2024 12:52 PM
Number of columns
Code (fw): Select all Collapse
? Len( oBrw:aCols )
To fill the width of browse window
Code (fw): Select all Collapse
oBrw:nStretchCol := STRETCHCOL_WIDEST
Regards



G. N. Rao.

Hyderabad, India
Posts: 179
Joined: Fri Dec 07, 2007 01:26 PM
Re: XBROWSE with "fullwidth" autocols
Posted: Thu Feb 29, 2024 02:18 PM
Dear Mr. Rao,

thank you for this perfect solution...now the cols are sitting very happily in their places :-)

Thank you again and kind regards
Ruth

Continue the discussion