Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-12

Images in SynEdit

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

ListMember

I am playing around with the XanaNews NNTP client, and I am considering using SynEdit as it's text editor.

While there are other ways of displaying images enclosed with the message, it would be nice (easier for me) if SynEdit itself allowed displaying these images (at the end).

I don't need any fancy features such as text flowing around these images or anything like that --displaying images at the end would be more than good enough.

Can SynEdit do this?

Cheers,

Adem

Reply by email

Martin
to ListMember
ListMember wrote 12 lines
I am playing around with the XanaNews NNTP client, and I am considering using SynEdit as it's text editor. While there are other ways of displaying images enclosed with the message, it would be nice (easier for me) if SynEdit itself allowed displaying these images (at the end). I don't need any fancy features such as text flowing around these images or anything like that --displaying images at the end would be more than good enough. Can SynEdit do this?

Not by itself.

But it has an OnPaint event, that is called after all text is painted. You can not suppress the text, but you can paint over it, or in addition to it.

You need to insert the right amount of spaces, and/or empty lines to provide the space for your images.

When you paint you must check SynEdit.LeftChar (horizetal scroll). Canvas.x = 0 is always at the leftmost *visible* char (which if scrolled is not the first char in the line)

For the vertical scrolling, use topline and LinesInWindow. If you use folding, it is a bit more work. I will need to look that up...

Reply by email

ListMember
to Martin
Martin wrote 22 lines
On 13/12/2012 14:58, ListMember wrote: > I am playing around with the XanaNews NNTP client, and I am > considering using SynEdit as it's text editor. > > While there are other ways of displaying images enclosed with the > message, it would be nice (easier for me) if SynEdit itself allowed > displaying these images (at the end). > > I don't need any fancy features such as text flowing around these > images or anything like that --displaying images at the end would be > more than good enough. > > Can SynEdit do this? Not by itself. But it has an OnPaint event, that is called after all text is painted. You can not suppress the text, but you can paint over it, or in addition to it. You need to insert the right amount of spaces, and/or empty lines to provide the space for your images.

It would be nice (instead of adding multiple lines) if I could somehow specify a line height (which would, obviously, be the height of the image).

Doesn't SynEdit allow for different font sizes --which I would translate to read as different line heights.

Show quoted text 6 lines
When you paint you must check SynEdit.LeftChar (horizetal scroll). Canvas.x = 0 is always at the leftmost *visible* char (which if scrolled is not the first char in the line) For the vertical scrolling, use topline and LinesInWindow. If you use folding, it is a bit more work. I will need to look that up...

OK. Even if a little elaborate, it appears it is possible. That's good news.

I'll get back to ask more when I have actually start doing the coding.

Thank you.

Reply by email

Martin
to ListMember
ListMember wrote 30 lines
On 2012-12-13 17:08, Martin wrote: > On 13/12/2012 14:58, ListMember wrote: >> I am playing around with the XanaNews NNTP client, and I am >> considering using SynEdit as it's text editor. >> >> While there are other ways of displaying images enclosed with the >> message, it would be nice (easier for me) if SynEdit itself allowed >> displaying these images (at the end). >> >> I don't need any fancy features such as text flowing around these >> images or anything like that --displaying images at the end would be >> more than good enough. >> >> Can SynEdit do this? > > Not by itself. > > But it has an OnPaint event, that is called after all text is painted. > You can not suppress the text, but you can paint over it, or in > addition to it. > > You need to insert the right amount of spaces, and/or empty lines to > provide the space for your images. It would be nice (instead of adding multiple lines) if I could somehow specify a line height (which would, obviously, be the height of the image). Doesn't SynEdit allow for different font sizes --which I would translate to read as different line heights.

All text in SynEdit uses the same font. And all lines have the same height.

You can specify SynEdit.ExtraLineSpacing. That affects *all* lines.

Reply by email