Lazarus

Programming => Packages and Libraries => Topic started by: pixelink on July 04, 2017, 08:27:22 pm

Title: All Things... lzRichEdit Control
Post by: pixelink on July 04, 2017, 08:27:22 pm
I am building an app with the lzRichEdit control...

First Q...

I see we can do Bullet Lists... but where is the Numbers List??


Also, for text alignment, we have left, center and right... but NO justify...
even though the WIKI says there is.
Title: Re: All Things... lzRichEdit Control
Post by: taazz on July 05, 2017, 01:17:38 am
The code that handle bullets for windows is in the file win32WSRichBox look for the method TWin32WSCustomRichBox.Para_SetNumbering you will quickly see that it handle the PFM_NUMBERING portion of the paragraph structure only which is compatible with all versions of rich edit for compatibility with v3 or newer you have to use the PFM_NUMBERINGSTYLE portion instead. for more info refer to MS documentation at https://msdn.microsoft.com/en-us/library/windows/desktop/bb774276(v=vs.85).aspx and https://msdn.microsoft.com/en-us/library/windows/desktop/bb787942(v=vs.85).aspx.

The preferred way would be to extend the win32wsrichbox and surface it to the lzrichedit control but you can always ignore cross platform and go for the kill

Title: Re: All Things... lzRichEdit Control
Post by: pixelink on July 05, 2017, 03:25:12 am
Well.. MS stuff wasn't too helpful.
I understand what they are saying, but they only have C++ code for the api.
How am I supposed to translate this to LAZ?

Why isn't the number list already in the lzEdit control?
Title: Re: All Things... lzRichEdit Control
Post by: taazz on July 05, 2017, 05:04:27 am
Well.. MS stuff wasn't too helpful.
I understand what they are saying, but they only have C++ code for the api.
How am I supposed to translate this to LAZ?

Why isn't the number list already in the lzEdit control?
find attached an experimental version of the richbox.pas unit. This works as expected on windows only. The screen shot says it all.
As you can see the only change required on the control was to extend the set with the extra values. It is up to you to make sure that the values are in the correct order.
Title: Re: All Things... lzRichEdit Control
Post by: pixelink on July 05, 2017, 03:45:38 pm
Does the numbering list indent like bullets??
The screenshot doesn't show that.

Are you the one who made lzRE??

THANKS
TinyPortal © 2005-2018