Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • Isomorphic
    replied
    #1 as we mentioned, we don't want to clip anything in a printed view, so any column widths we might set would be at best advisory. If you are looking for fixed columns and clipping, then you presumably do not want the printed view.

    #2 All of the content is within a single HTML table, so nothing is misaligned. Are you saying that if you look into the DOM, the height of the content is taller for some cells? That's simply because the image plus text is taller than text alone. That's normal, and there does not appear to be an impact - is there something you're saying is visually wrong here?

    Leave a comment:


  • slick07
    replied
    OK for #2 please go to https://www.smartclient.com/smartgwt.../#tree_sorting then change to Enterprise skin and Dense density. Then hide the Title column to avoid word wrap and hit print. In Print Preview if you inspect the rows you will see a 26 height for non-leaf versus 22 height for leaf.

    Leave a comment:


  • slick07
    replied
    #1 We want the user to arrange the order and the size of the columns and to print them as they are. It is up to him to arrange them in such a way to fit their paper size... I understand that you are not aware of the target environment but this would not be a problem if the user prints on an A1 size for example. A screenshot is limited to the screen size hence this is a no go.

    #2 The treeGrid uses horizontal and vertical lines with Entreprise skin and no customisation. The height difference appears because of the collapse/expand icons for non-leaf nodes. I shall try to reproduce in your showcase and get back on this...

    Leave a comment:


  • Isomorphic
    replied
    #1 was covered above:

    We don't try to control the widths of columns in the print preview and just let browser heuristics kick in, because we don't really know the target overall width for what's being printed, so we don't know how to allocate sizes to columns.
    We do not try to control sizes on printed output, because we have no idea what the target environment is, and we don't want to clip anything. If this isn't right for whatever you plan to do with the output, perhaps you want a screenshot instead?

    #2 please let us know how this can be reproduced. If you can't do it by pointing to an online sample, then please be very specific about browser, OS, skin, density, whether you have customized the skin or applied formatters, etc.

    Leave a comment:


  • slick07
    replied
    I am not sure what is best: to create a new topic or ask here but here is goes...

    1. What is the possibility to maintain the columns widths for the generated print html? Also how to keep the columns header height?
    2. The height of rows for treeGrids are not equal. The height for a non-leaf node is slightly bigger that the one of a leaf. Way is that and how can that be fixed?

    Leave a comment:


  • Isomorphic
    replied
    Canvas.getIsPrinting() will return true

    Leave a comment:


  • mathias
    replied
    Ok, how does a cellformatter know that it is printed html that is being generated?

    Leave a comment:


  • Isomorphic
    replied
    Right, both of our suggestions above would be modifying the HTML - one after calling getPrintHTML() (e.g.: search and replace) and the other via a CellFormatter that behaves differently when printed HTML is being generated.

    Leave a comment:


  • mathias
    replied
    Thanks for quick response!

    When i mention i tried minwidth, wrap to false etc, that is the grid properties, via java code. This does not seem to work.

    However, if i use FireBug in Firefox on the print preview, and manually add a CSS "minWidth" property on the column, it works, so technically it seems to me that it should be possible for it to work.

    So youi mean that i could manually add the minwidth property in the java code? Not sure how i would do that.

    Leave a comment:


  • Isomorphic
    replied
    We don't try to control the widths of columns in the print preview and just let browser heuristics kick in, because we don't really know the target overall width for what's being printed, so we don't know how to allocate sizes to columns. You didn't mention which browser - which is it?

    When you refer to these settings you've tried, are you referring to grid settings or manipulating the HTML after the grid has generated it? The former would not be expected to work, since the printed HTML doesn't use those settings. But the latter approach should work if you want to try to inject additional settings to influence printing. You could also have a CellFormatter that detects that printed output is being asked for, and adds a containing <span> or <div> to the cell contents to influence the wrapping width or turn off wrapping for other columns.

    Leave a comment:


  • mathias
    started a topic Issues with listgrid print preview.

    Issues with listgrid print preview.

    I have a listgrid with a couple of columns, where one is "note" and can be very large. When there is a lot of text, the columns becomes so big so that the other columns are squeezed together. In the grid itself this is not an issue, since i call setWidth on the other columns, and that is respected.

    However, in the print preview this is not the case, and the other columns are shrinked so that there's for example wordwrap on datetimes.

    I have tried setting wrap to false, tried setting minwidth on all other columns, but nothing works. If i do setWidth in CSS manually using firebug it works.


    So, this is my question: Is there any way for me to specify that a specific listgrid column should have a minwidth attribute that makes it into the print preview?


    As an aside, i noticed that the print preview is not resized when the window is resized. Is this by design? It looks kind of strange.
Working...
X