Re: Setting table row height according the renderer component




"noa" <noah.drach@xxxxxxxxx> wrote in message
news:1166689234.871145.216520@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


On Dec 20, 10:18 pm, "Oliver Wong" <o...@xxxxxxxxxxxxxx> wrote:
"noa" <noah.dr...@xxxxxxxxx> wrote in
messagenews:1166621857.102513.143040@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Here, notice that the end of a string is marked "end of text"[code
snipped]

Works for me. I'm using Java 1.6.0.

1.I have to use 1.4*
2. are you sure it works? you saw the "end of text" string at the end
of every text cell?

No, I only saw "end of text" for the cell with the snowboards, not the
cell with the "blah blah blah", so it doesn't actually work.

The problem is that you're using getPreferredSize() to try to determine
the height of the cells. In the case of
"Snowboard\nSnowboard\nSnowboard\nend of text" (or whatever), your text is 4
lines long, and so the preferred size has a height such that it's possible
to display 4 lines. But your "Bla bla bla bla bla bla" is just 1 super long
line, and so the preferred size is something like "width = 500px, height =
20px", i.e. a super wide, but short, rectangle.

Since in your code, you only keep the maximum height, the height for the
Snowboard text is kept, and thus the height is only big enough for 4 lines,
not for the 10 lines of your bla bla bla text.

It looks like you might have to perform line wrapping calculations
manually to get the effect you want.

- Oliver


.



Relevant Pages

  • Re: Remove last
  • entry from cells
    ... Sub DeleteTag() ... For Each cell In Selection ... they are HTML tags for lists as in: ... Blah blah blah ...
    (microsoft.public.excel.misc)
  • Re: Remove last
  • entry from cells
    ... Sub DeleteTag() ... For Each cell In Selection ... Blah blah blah ...
    (microsoft.public.excel.misc)
  • Re: Using VLOOKUP with a reference to a different file...
    ... in cell B4, then it works ... The way your VLOOKUP formula is set up, ... But sheet 1 is replaced by the name of my first ... [bla bla bla (Updated ...
    (microsoft.public.excel.worksheet.functions)
  • RE: formula problems
    ... Wag more, bark less ... Pretend this is cell c2 ... M8="F" then blah blah blah in the same formula for those scores. ...
    (microsoft.public.excel.misc)
  • Re: Integrating browser with excel
    ... and blah blah till as the output of debug.print ... Dim IE As Object ... Or is it possible to find a string "Report Owner" in the page ... value given in the right hand side cell of the cell where the string ...
    (microsoft.public.excel.programming)