[Lazarus] DBGrid columns shrunk to fit data

waldo kitty wkitty42 at windstream.net
Fri Jun 19 02:43:59 CEST 2009


Luca Olivetti wrote:
> En/na Graeme Geldenhuys ha escrit:
>> Graeme Geldenhuys wrote:
>>> Is there an option for the DBGrid to automatically resize its columns to
>>> fit the data?
>>
>>
>> Anybody know if TDBGrid can do this? If so, what properties need to be 
>> set?
>>
>> Here is a bug report regarding this issue. The report also contains two
>> comparison images showing the difference: FlameRobin vs LazDataDesktop
>> executing the exact same query and the default result data grid 
>> generated.
> 
> TRxDBGrid can do it, however (and obviously) it has to iterate through 
> all the records to find the longest one.

hunh? why iterate thru? doesn't it already have to process each row when they 
come in from the server? that would be the time and place to do this width 
setting, in my old school procedural mindset...

> 
> BTW, I'm all for having all the nice options in TRxDbGrid in the 
> standard TDBGrid (though I'm not sure the license allows to copy them 
> verbatim), my suggestion is only if you want a solution *now*
> 
> Bye


-- 
        _\/
       (@@)                      Waldo Kitty, Waldo's Place USA
__ooO_( )_Ooo_____________________ telnet://bbs.wpusa.dynip.com
_|_____|_____|_____|_____|_____|_____ http://www.wpusa.dynip.com
____|_____|_____|_____|_____|_____|____ ftp://ftp.wpusa.dynip.com
_|_Eat_SPAM_to_email_me!_YUM!__|_____ wkitty42 -at- windstream.net




More information about the Lazarus mailing list