Page 1 of 1

XBROWSE with "fullwidth" autocols

PostPosted: Thu Feb 29, 2024 12:25 pm
by Ruth
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

Image

Code: Select all  Expand view
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 } }

Re: XBROWSE with "fullwidth" autocols

PostPosted: Thu Feb 29, 2024 12:52 pm
by nageswaragunupudi
Number of columns
Code: Select all  Expand view
? Len( oBrw:aCols )


To fill the width of browse window
Code: Select all  Expand view
oBrw:nStretchCol := STRETCHCOL_WIDEST

Re: XBROWSE with "fullwidth" autocols

PostPosted: Thu Feb 29, 2024 2:18 pm
by Ruth
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