[Gambas-user] automatic column width in DataBrowser
Benoît Minisini
gambas at ...1...
Wed Dec 18 04:03:06 CET 2013
Le 17/12/2013 12:41, nero a écrit :
> Hi all , I'm using a <DataBrowser> to get some data from a postgresql
> database , everything's work fine but I've some problema setting
> column width.
>
> When I double click between two columns they get the right width , is
> there a way to do so by code ?
DataBrowser use an inner TableView that is returned by the View
property. You can set the width on one of its column to "-1" to get the
right width (it does not take into accound all the rows, but the first
thousand one AFAIR).
>
> Also can I set test allignment of the cells ? I see some data on
> right , some on left , I want everything centered.
>
> I've try to play with DataBrowser.columns and DataBrowser.columns[x]
> but haven't found any solution.
>
> Thank's in advance, marco.
>
The DataBrowser raises a "Data" event each time it's going to display a
cell. This is like the Data event of the TableView, i.e. you can fill
the DataBrowser Data property (yes, same name) to define how to display
the specified cell during the Data event handler.
Regards,
--
Benoît Minisini
More information about the User
mailing list