This is a migrated thread and some comments may be shown as answers.

Align pictureBox on the left of the content of the textbox

1 Answer 13 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Andrey
Top achievements
Rank 1
Andrey asked on 10 Mar 2021, 07:10 PM

One of the most recent report updates from business side requires me to change report layout to accommodate the following output(picture attached).

 

But since HtmlTextBox does not support embedding of images and PictureBox has to be fixed statically on a page I do not see a way to make the picture box to line up with a text content that is aligned to the right.

Is this possible to achieve by some other means?
 

1 Answer, 1 is accepted

Sort by
0
Mads
Telerik team
answered on 15 Mar 2021, 12:40 PM

Hi Andrey,

As I do not have your report and HTML to test with, I can not say with certainty that this will work in your scenario. In my testing, I created an HTML Text Box that contains the text in a single line, which is required to make the following approach work.

Because the PictureBox and HTML Text Box might be of different height, it is difficult to align them correctly. Though HTML Text Box only has a few CSS values that can be applied in the HTML, Style-properties can at the same time be applied. The idea is to center the image inside the PictureBox, and center the text vertically inside the box. 

In the scenario that the HTML Text Box is bigger, containing multiple lines of text, this will not work I believe and I can not see how correct alignment can be achieved, unfortunately.

I hope you find this information useful. Let me know if it will solve the issue in your scenario.

Regards, Mads Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Andrey
Top achievements
Rank 1
Answers by
Mads
Telerik team
Share this question
or