-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
textbox properties #403
Comments
Same question here. |
The Same question |
Same question. |
From what I can see there is no way to do this since TextBox inherits from Image (ref https://github.com/PHPOffice/PHPWord/blob/develop/src/PhpWord/Style/TextBox.php) which inherits from Frame (https://github.com/PHPOffice/PHPWord/blob/develop/src/PhpWord/Style/Image.php). to me this is a clear deficiency in this library, and would require some work. They would need to have TextBox Style implement the Fill abstraction (https://github.com/PHPOffice/PHPWord/blob/develop/src/PhpWord/Style/Fill.php) and then update the output to handle it. From what I can see (https://github.com/PHPOffice/PHPWord/blob/develop/src/PhpWord/Writer/Word2007/Element/TextBox.php) It does not look like there is any implementation for outputting a background color whatsoever for the textbox class. So it would be necessary to add that for all of the writer classes as well, using the "Shading" model likely (https://github.com/PHPOffice/PHPWord/blob/develop/src/PhpWord/Writer/Word2007/Style/Shading.php) So yeah... Something for folks to do when they want. |
A workaround is to use a table, with a single cell. |
@kjrose ofr the table with a single cell is it possible to achieve rounding (broder radius) ? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Is it possible to give textbox background color?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: