Capturing the width of a xBrowse Column

Capturing the width of a xBrowse Column

Postby Rick Lipkin » Mon Feb 13, 2012 3:16 pm

To All

I have been asked if a user stretches an xBrowse column to be able to capture the width of that column and then restore the with of that column when the user returns.

Is there a way to know what the widths of each xBrowse column is at close ? .. then be able to restore the custom changes a user makes to restore their preference ?

Thanks
Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Capturing the width of a xBrowse Column

Postby ukoenig » Mon Feb 13, 2012 4:18 pm

Rick a sample :

Returns a Array of Column-width :
Code: Select all  Expand view

// a array to save the Column-width of all Columns
//---------------------------------------------------------
private aColW[LEN( oBrw:aCols )]
i := 1
FOR i := 1 TO LEN( oBrw:aCols )
   WITH OBJECT oBrw:aCols[i]
      aColW[i] := oBrw:aCols[i]:nWidth
   END
   msgalert( aColW[i], "Column : " + ltrim(str(i)) )
NEXT
 


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: Capturing the width of a xBrowse Column

Postby Rick Lipkin » Mon Feb 13, 2012 5:18 pm

Uwe

Thank you !

Rick
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Capturing the width of a xBrowse Column

Postby nageswaragunupudi » Mon Feb 20, 2012 6:32 am

Much easier way (may not be in very old versions)

oBrw:nWidths --> Array of widths of all columns

oBrw:nWidthds := { <w1>, <w2>, ...<wN> } sets widths of each column
Regards

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