View previous topic :: View next topic |
Author |
Message |
gastan
Joined: 18 Oct 2008 Posts: 25
|
Posted: Sun Oct 26, 2008 12:10 pm Post subject: How to group elements together |
|
|
Hi
I am combining text and images, and I need to keep headings of images together with images, so they are always at the same page. Sometimes it happens, heading is at the end of one page, and image on another.
How could I group these elemets together, soe they wll both be flowing on to next page if at the end of page ?
thx |
|
Back to top |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Mon Oct 27, 2008 10:32 am Post subject: |
|
|
Hi!
You can set this with the style or the paragraph of the heading:
Code: | paragraph.Format.KeepWithNext = true; |
_________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
|
gastan
Joined: 18 Oct 2008 Posts: 25
|
Posted: Mon Oct 27, 2008 5:43 pm Post subject: |
|
|
thx very much
I'll give it a shot tonite
how about grouping two pics together ?
I tried to put them into paragrap, but then I was not able to position first pics (pic.Left didnt work)
normally I just add pics (generated from PDFSharp) via lastsection.AddImage("filename") |
|
Back to top |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Tue Oct 28, 2008 9:05 am Post subject: |
|
|
With pictures in paragraphs you should be able to use
Code: | paragraph.Format.LeftIndent |
_________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
|
gastan
Joined: 18 Oct 2008 Posts: 25
|
Posted: Wed Oct 29, 2008 9:14 pm Post subject: |
|
|
well, I position upper image depending on value (Arrow that points out value on the bar chart, so the left position is variable
I am not sure I can change styles on runtime. |
|
Back to top |
|
|
gastan
Joined: 18 Oct 2008 Posts: 25
|
Posted: Wed Oct 29, 2008 11:18 pm Post subject: |
|
|
well if I style i via paragraph, then both are LeftIdented.
I just need to move firt image to right, second should stay |
|
Back to top |
|
|
gastan
Joined: 18 Oct 2008 Posts: 25
|
Posted: Wed Oct 29, 2008 11:25 pm Post subject: I made it |
|
|
Well, I managed.
I added first pic to one paragraph with ident and keepwith next
and second in normal paragraph
it all sticked together.
cool deal
thx man |
|
Back to top |
|
|
gastan
Joined: 18 Oct 2008 Posts: 25
|
Posted: Thu Nov 06, 2008 10:22 pm Post subject: |
|
|
Hi
I have problem with keeping chart and text together
somehow it will not render part of chart at the bottom of the page (as it's out of bonds (I would rather to put it on next page along with it's caption) |
|
Back to top |
|
|
|