Home » U++ Library support » RichText,QTF,RTF... » how can i get the image in the RichText?
|
|
|
|
Re: how can i get the image in the RichText? [message #54480 is a reply to message #54478] |
Wed, 29 July 2020 12:09 |
|
mirek
Messages: 14050 Registered: November 2005
|
Ultimate Member |
|
|
That needs changes in RichText/RichEdit.
However, why not... I have now added DrawSelection field to PaintInfo to customize the appearance. This is now possible in the trunk:
RichEditWithToolBar e;
PaintInfo pi;
pi.DrawSelection = [](Draw& dw, int x, int y, int cx, int cy) {
static Image m;
ONCELOCK {
m = CreateImage(Size(128, 128), 50 * Blue());
}
dw.Clip(x, y, cx, cy);
for(int w = 0; w < cx; w += 128)
for(int h = 0; h < cy; h += 128)
dw.DrawImage(x + w, y + h, m);
dw.End();
};
e.SetPaintInfo(pi);
[Updated on: Wed, 29 July 2020 12:09] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Sun Oct 06 19:22:07 CEST 2024
Total time taken to generate the page: 0.01810 seconds
|