Autore Topic: Larghezza automatica di una colonna nel DataBrowser  (Letto 287 volte)

Offline vuott

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 11.303
  • Ne mors quidem nos iunget
    • Mostra profilo
Larghezza automatica di una colonna nel DataBrowser
« il: 18 Dicembre 2013, 10:14:17 »
Vi riporto questa discussione apparsa nella M.L. ufficiale:


" 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 ?

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.
"


" 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).

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
"
« Ultima modifica: 24 Marzo 2014, 01:39:37 da vuott »
« Chiunque, non ricorrendo lo stato di necessità, nel proprio progetto Gambas fa uso delle istruzioni Shell o Exec, è punito con la sanzione pecuniaria da euro 20,00 a euro 60,00. »