XBROWSE with "fullwidth" autocols

XBROWSE with "fullwidth" autocols

Postby Ruth » 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

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 } }
User avatar
Ruth
 
Posts: 135
Joined: Fri Dec 07, 2007 1:26 pm

Re: XBROWSE with "fullwidth" autocols

Postby nageswaragunupudi » Thu Feb 29, 2024 12:52 pm

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
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: XBROWSE with "fullwidth" autocols

Postby Ruth » Thu Feb 29, 2024 2: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
User avatar
Ruth
 
Posts: 135
Joined: Fri Dec 07, 2007 1:26 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 83 guests