FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour xBrowse dynamic header array fixed column
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
xBrowse dynamic header array fixed column
Posted: Fri Oct 12, 2012 09:05 PM
To All

I have an xBrowse based on an array created with employee names based on an Employee table. When I create the browse I use the employee array to create the ( dynamic ) headers that label the columns with the Employees name.

As I start filling in the browse grid, the columns change in size based on the data I plug into each element. Is there a way to set a fixed column width without using the ColSizes clause ?

Here is my code for the browse :

Code (fw): Select all Collapse
DEFINE WINDOW oWndChildA           ;
       FROM 0,0 to 39,102          ;
       MDICHILD                    ;
       OF oWnd                     ;
       ICON oIco                   ;
       TITLE xTITLE

       DEFINE DIALOG oSch RESOURCE "SCHEDULE" of oWndChildA

       REDEFINE xBROWSE oLbxA        ;
         ARRAY aSchedule             ;
         HEADERS aHeader             ;
         ID 172 of oSch              ;
       AUTOCOLS LINES CELL //FASTEDIT

       oLbxA:nRowHeight() := 35




Thanks
Rick Lipkin
Posts: 1088
Joined: Fri Oct 07, 2005 03:33 PM
Re: xBrowse dynamic header array fixed column
Posted: Sat Oct 13, 2012 12:47 AM
Rick,

try in the same previous way

Code (fw): Select all Collapse
 AEVAL( oBrw:aCols, {|o| o:nWidth := <size> } )


I don't tryed this, but I think must work

Code (fw): Select all Collapse
  XBROWSE oBrw.... SIZES aSizes


Where aSizes is a array with the columns width

I hope this help you

Regards

Marcelo
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: xBrowse dynamic header array fixed column
Posted: Sat Oct 13, 2012 01:19 PM

Marcelo

Thank you .. I tried your first option and it worked very nicely !

Rick Lipkin

Continue the discussion