trichview.com

trichview.support




Re: Switching out of Best Width mode


Return to index


Author

Message

Joe

Posted: 02/20/2002 19:51:01


>>So you cannot keep 50% width if table.BestWidth=0, you can keep only fixed

size.


Can I change the fixed size if I do the following:


1. first set the table to BestWidth = -50 (percentage) and then

2. calculate the width of one cell in each column in the table in pixels,

and then

3. set BestWidth = <total pixel value of columns> and then

4. set table.BestWidth = 0?


I tried this approach but cannot find a good way to calculate the width of

a table in pixels.


Is this feasible? If so, is there a way to calculate table width in pixels,

based on cell width?


I want a user, who creates his own table, to be able to first size it based

on a percentage, and then to be able to manually resize the table himself.


Thanks,

Joe.



"Sergey Tkachenko" <svt@trichview.com> wrote:

>If table.BestWidth = 0, there are two possibilities

>1) All columns have width defined in pixels (i.e. at least one cell in each

>column has width defined in pixels, and there are no cells with widths

>defined in percents)

>Table will have width calculated by widths of columns

>2) If not, table will be resized on full window width.

>

>So you cannot keep 50% width if table.BestWidth=0, you can keep only fixed

>size.

>

>Probably, future versions will have more smart calculation of table width.

>

>> If I do the following will the table remain at the 50% width even after

I

>> return to manual mode by setting it back to 0? Or, does it shrink back

to

>> its previous size?

>>

>> When I execute the following statement I see it first increase by 50%

and

>> then return to its previous size.

>>

>> How can I keep it from returning to its previous size?

>>

>> FRVTable.BestWidth := -50

>> (Parent as TRichHtml).Format;

>>

>> FRVTable.BestWidth := 0; // return to manual mode

>> (Parent as TRichHtml).Format;

>

>

>





Powered by ABC Amber Outlook Express Converter