Insert Picture Question
Insert Picture Question
How do I get a newly inserted picture to be vertically aligned in the middle of the line. The image is 16x16.
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Unfortunately, generally it's not possible, if you do not know text height.
Image can be positioned relative to the text base line, not relative to the middle of line. More options will be implemented in future, but not now.
Properties for vertical text positioning:
1) VAlign has 2 values:
- image bottom <-> text base line
- image middle <-> text base line.
2) More precise positioning can be done using item's extra integer properties: you can shift the picture up and down by the specified number of pixels or percents. See the help about TRVExtraItemProperty type.
Image can be positioned relative to the text base line, not relative to the middle of line. More options will be implemented in future, but not now.
Properties for vertical text positioning:
1) VAlign has 2 values:
- image bottom <-> text base line
- image middle <-> text base line.
2) More precise positioning can be done using item's extra integer properties: you can shift the picture up and down by the specified number of pixels or percents. See the help about TRVExtraItemProperty type.
Sergey,
I don't know RV's internals but I can't see how it would be difficult to place an image at the middle of a line. As far as I can understand:
1- You can already position the image according to the base line, which means that you have a method to modify vertical position of an image after the computation of the whole line's base;
2- You obviously can separate one line from the other without overlaping, which means that you should be able to compute the line's height. Or do you use another method ?
Now knowing the line's height, why can't you modify the position of the image to place it at the middle of the line ?
I'm sure I'm missing something but I'm curious to know why this can't be so simple
I don't know RV's internals but I can't see how it would be difficult to place an image at the middle of a line. As far as I can understand:
1- You can already position the image according to the base line, which means that you have a method to modify vertical position of an image after the computation of the whole line's base;
2- You obviously can separate one line from the other without overlaping, which means that you should be able to compute the line's height. Or do you use another method ?
Now knowing the line's height, why can't you modify the position of the image to place it at the middle of the line ?
I'm sure I'm missing something but I'm curious to know why this can't be so simple
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17565
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: