I
have not been able to understand the requirement shared. But I like to
share that one can form the text box using Aspose.Slides like other
normal shapes as text box is also an AutoShapeEx instance.
What I ask is whether I can use the old and simple text placeholders (TextHolder) and avoid the new Aspose placeholders (at least for textboxes only). In that way, I wont have to add a new shape (hopping that the placeholder properties will be applied to it) but only to insert my text into the TextHolder (that already has the properties defined). But I guess this will increase the complexity of my code (dealing with two different types of placeholders), so it's better for me to wait for you to make your modifications. I just don't know how long this can take.
I
don't feel it is possible as dimension includes number of rows and
columns needed for the table to be added. Also, like PowerPoint the
minimum table row height or column width that can be set is 29.
My problem is that when I create a table right now it doesn't move where the theme tells it to move. The only thing that I can imagine that can cause this, is setting the table coordinates and size by code. What I would like is to be able, for example, to specify NaN for column width and row height like that (hoping that this will solve the problem) :
double NaN = double.NaN;
Slide.Shapes.AddTable(NaN, NaN, new double[]{NaN,NaN}, new double[]{NaN,NaN});
Again, you do know the number of rows & columns of the table and I think it is possible not to set it’s dimensions (or inherit them from the placeholder). Right now, the code above throws an exception because NaN is not a valid width or height. And if I specify a real value for height & width the table doesn’t follow the theme’s layout.
If you can think of any other reason that the table doesn’t move with the theme change, let me know. Right now, unfortunately, I can’t imagine anything else.
I attach a new project that shows the problem with the table in detail. The file
“Aspose vs PowerPoint (2 Slides).pptx” has two slides, one created with Aspose and one created with PowerPoint. They both use the same layout. However, the one created by PowerPoint moves the table when you change the theme (from the “Design” tab), while the one created with Aspose doesn’t.
From my understanding, by specifying a table width or height different than the one the placeholder uses, you prevent the table from following the position specified in the theme’s layout. You can verify this by modifying the table size in the slide created with PowerPoint (inside
“Aspose vs PowerPoint (2 Slides).pptx”). Once you do this, the table stops following the layout of the theme.
Perhaps it’s just that the table doesn’t inherit the exact position of the placeholder assigned to it that creates the problem. If that is the case, the list of inheritance problems becomes:
1) Background colors of “Title” and “Body”.
2) Borders (color and width) of “Title” and “Body”.
3) Horizontal & vertical text alignment of “Title” and “Body”.
4) Font of “Title” (including the Bold/Italic/etc attributes).
5) Position & (mostly) size of “Table”.
I hope I have helped you locate the problem and understand my requirements. If you could provide a fix for these 5 problems soon it would be great.
Best Regards,
Kostas.