User Tools

Site Tools


how_to_autosize_all_columns_in_a_browse_box_when_the_window_opens.htm
Navigation:  How To's and Troubleshooting > How to… >====== How to Autosize all Columns in a Browse Box when the Window Opens ====== Previous pageReturn to chapter overviewNext page

NewC7.jpg

A feature is available in Clarion Win32 that allows the auto-sizing of Browse Box columns available from the Global Properties App Settings tab control. At runtime, double-clicking on a column auto sizes the column to fit the data contents.

There is a simple way to extended this feature and get all the columns in a browse box to autosize when the window opens.

Set the following property after the browse box is initialized, and after the list box has been populated:

BRWx::AutoSizeColumn.ResizeAll()

where BRWx is equal to the instance of the browse object. A good embed point is the very last embed point provided by the Window Manager's Init method:

! Prepare Alert Keys

 SELF.SetAlerts()

 ! [Priority 9001]

 BRW1::AutoSizeColumn.Init()

 BRW1::AutoSizeColumn.AddListBox(?Browse:1,Queue:Browse:1)

 ! [Priority 9550]

BRW1::AutoSizeColumn.ResizeAll()

 ! End of “WindowManager Method Executable Code Section”

 RETURN ReturnValue

how_to_autosize_all_columns_in_a_browse_box_when_the_window_opens.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1